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 2012 Google Inc. |
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 | #ifndef GrBuiltInPathRenderer_DEFINED |
michael@0 | 10 | #define GrBuiltInPathRenderer_DEFINED |
michael@0 | 11 | |
michael@0 | 12 | #include "GrPathRenderer.h" |
michael@0 | 13 | |
michael@0 | 14 | class GrContext; |
michael@0 | 15 | class GrGpu; |
michael@0 | 16 | |
michael@0 | 17 | /** |
michael@0 | 18 | * Uses GrGpu::stencilPath followed by a cover rectangle. This subclass doesn't apply AA; it relies |
michael@0 | 19 | * on the target having MSAA if AA is desired. |
michael@0 | 20 | */ |
michael@0 | 21 | class GrStencilAndCoverPathRenderer : public GrPathRenderer { |
michael@0 | 22 | public: |
michael@0 | 23 | |
michael@0 | 24 | static GrPathRenderer* Create(GrContext*); |
michael@0 | 25 | |
michael@0 | 26 | virtual ~GrStencilAndCoverPathRenderer(); |
michael@0 | 27 | |
michael@0 | 28 | virtual bool canDrawPath(const SkPath&, |
michael@0 | 29 | const SkStrokeRec&, |
michael@0 | 30 | const GrDrawTarget*, |
michael@0 | 31 | bool antiAlias) const SK_OVERRIDE; |
michael@0 | 32 | |
michael@0 | 33 | protected: |
michael@0 | 34 | virtual StencilSupport onGetStencilSupport(const SkPath&, |
michael@0 | 35 | const SkStrokeRec&, |
michael@0 | 36 | const GrDrawTarget*) const SK_OVERRIDE; |
michael@0 | 37 | |
michael@0 | 38 | virtual bool onDrawPath(const SkPath&, |
michael@0 | 39 | const SkStrokeRec&, |
michael@0 | 40 | GrDrawTarget*, |
michael@0 | 41 | bool antiAlias) SK_OVERRIDE; |
michael@0 | 42 | |
michael@0 | 43 | virtual void onStencilPath(const SkPath&, |
michael@0 | 44 | const SkStrokeRec&, |
michael@0 | 45 | GrDrawTarget*) SK_OVERRIDE; |
michael@0 | 46 | |
michael@0 | 47 | private: |
michael@0 | 48 | GrStencilAndCoverPathRenderer(GrGpu*); |
michael@0 | 49 | |
michael@0 | 50 | GrGpu* fGpu; |
michael@0 | 51 | |
michael@0 | 52 | typedef GrPathRenderer INHERITED; |
michael@0 | 53 | }; |
michael@0 | 54 | |
michael@0 | 55 | #endif |