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