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