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 | /* |
michael@0 | 3 | * Copyright 2006 The Android Open Source Project |
michael@0 | 4 | * |
michael@0 | 5 | * Use of this source code is governed by a BSD-style license that can be |
michael@0 | 6 | * found in the LICENSE file. |
michael@0 | 7 | */ |
michael@0 | 8 | |
michael@0 | 9 | |
michael@0 | 10 | #ifndef SkComposeShader_DEFINED |
michael@0 | 11 | #define SkComposeShader_DEFINED |
michael@0 | 12 | |
michael@0 | 13 | #include "SkShader.h" |
michael@0 | 14 | |
michael@0 | 15 | class SkXfermode; |
michael@0 | 16 | |
michael@0 | 17 | /////////////////////////////////////////////////////////////////////////////////////////// |
michael@0 | 18 | |
michael@0 | 19 | /** \class SkComposeShader |
michael@0 | 20 | This subclass of shader returns the coposition of two other shaders, combined by |
michael@0 | 21 | a xfermode. |
michael@0 | 22 | */ |
michael@0 | 23 | class SK_API SkComposeShader : public SkShader { |
michael@0 | 24 | public: |
michael@0 | 25 | /** Create a new compose shader, given shaders A, B, and a combining xfermode mode. |
michael@0 | 26 | When the xfermode is called, it will be given the result from shader A as its |
michael@0 | 27 | "dst", and the result of from shader B as its "src". |
michael@0 | 28 | mode->xfer32(sA_result, sB_result, ...) |
michael@0 | 29 | @param shaderA The colors from this shader are seen as the "dst" by the xfermode |
michael@0 | 30 | @param shaderB The colors from this shader are seen as the "src" by the xfermode |
michael@0 | 31 | @param mode The xfermode that combines the colors from the two shaders. If mode |
michael@0 | 32 | is null, then SRC_OVER is assumed. |
michael@0 | 33 | */ |
michael@0 | 34 | SkComposeShader(SkShader* sA, SkShader* sB, SkXfermode* mode = NULL); |
michael@0 | 35 | virtual ~SkComposeShader(); |
michael@0 | 36 | |
michael@0 | 37 | virtual bool setContext(const SkBitmap&, const SkPaint&, |
michael@0 | 38 | const SkMatrix&) SK_OVERRIDE; |
michael@0 | 39 | virtual void endContext() SK_OVERRIDE; |
michael@0 | 40 | virtual void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE; |
michael@0 | 41 | |
michael@0 | 42 | SK_TO_STRING_OVERRIDE() |
michael@0 | 43 | SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeShader) |
michael@0 | 44 | |
michael@0 | 45 | protected: |
michael@0 | 46 | SkComposeShader(SkReadBuffer& ); |
michael@0 | 47 | virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
michael@0 | 48 | |
michael@0 | 49 | private: |
michael@0 | 50 | |
michael@0 | 51 | SkShader* fShaderA; |
michael@0 | 52 | SkShader* fShaderB; |
michael@0 | 53 | SkXfermode* fMode; |
michael@0 | 54 | |
michael@0 | 55 | typedef SkShader INHERITED; |
michael@0 | 56 | }; |
michael@0 | 57 | |
michael@0 | 58 | #endif |