gfx/skia/trunk/include/core/SkFontLCDConfig.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 /*
     2  * Copyright 2013 Google Inc.
     3  *
     4  * Use of this source code is governed by a BSD-style license that can be
     5  * found in the LICENSE file.
     6  */
     8 #ifndef SkFontLCDConfig_DEFINED
     9 #define SkFontLCDConfig_DEFINED
    11 #include "SkTypes.h"
    13 class SkFontLCDConfig {
    14 public:
    15     /** LCDs either have their color elements arranged horizontally or
    16         vertically. When rendering subpixel glyphs we need to know which way
    17         round they are.
    19         Note, if you change this after startup, you'll need to flush the glyph
    20         cache because it'll have the wrong type of masks cached.
    22         @deprecated use SkPixelGeometry instead.
    23     */
    24     enum LCDOrientation {
    25         kHorizontal_LCDOrientation = 0,    //!< this is the default
    26         kVertical_LCDOrientation   = 1
    27     };
    29     /** @deprecated set on Device creation. */
    30     static void SetSubpixelOrientation(LCDOrientation orientation);
    31     /** @deprecated get from Device. */
    32     static LCDOrientation GetSubpixelOrientation();
    34     /** LCD color elements can vary in order. For subpixel text we need to know
    35         the order which the LCDs uses so that the color fringes are in the
    36         correct place.
    38         Note, if you change this after startup, you'll need to flush the glyph
    39         cache because it'll have the wrong type of masks cached.
    41         kNONE_LCDOrder means that the subpixel elements are not spatially
    42         separated in any usable fashion.
    44         @deprecated use SkPixelGeometry instead.
    45      */
    46     enum LCDOrder {
    47         kRGB_LCDOrder = 0,    //!< this is the default
    48         kBGR_LCDOrder = 1,
    49         kNONE_LCDOrder = 2
    50     };
    52     /** @deprecated set on Device creation. */
    53     static void SetSubpixelOrder(LCDOrder order);
    54     /** @deprecated get from Device. */
    55     static LCDOrder GetSubpixelOrder();
    56 };
    58 #endif

mercurial