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 2011 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 GrAAHairLinePathRenderer_DEFINED |
michael@0 | 10 | #define GrAAHairLinePathRenderer_DEFINED |
michael@0 | 11 | |
michael@0 | 12 | #include "GrPathRenderer.h" |
michael@0 | 13 | |
michael@0 | 14 | class GrAAHairLinePathRenderer : public GrPathRenderer { |
michael@0 | 15 | public: |
michael@0 | 16 | virtual ~GrAAHairLinePathRenderer(); |
michael@0 | 17 | |
michael@0 | 18 | static GrPathRenderer* Create(GrContext* context); |
michael@0 | 19 | |
michael@0 | 20 | virtual bool canDrawPath(const SkPath& path, |
michael@0 | 21 | const SkStrokeRec& stroke, |
michael@0 | 22 | const GrDrawTarget* target, |
michael@0 | 23 | bool antiAlias) const SK_OVERRIDE; |
michael@0 | 24 | |
michael@0 | 25 | typedef SkTArray<SkPoint, true> PtArray; |
michael@0 | 26 | typedef SkTArray<int, true> IntArray; |
michael@0 | 27 | typedef SkTArray<float, true> FloatArray; |
michael@0 | 28 | |
michael@0 | 29 | protected: |
michael@0 | 30 | virtual bool onDrawPath(const SkPath& path, |
michael@0 | 31 | const SkStrokeRec& stroke, |
michael@0 | 32 | GrDrawTarget* target, |
michael@0 | 33 | bool antiAlias) SK_OVERRIDE; |
michael@0 | 34 | |
michael@0 | 35 | private: |
michael@0 | 36 | GrAAHairLinePathRenderer(const GrContext* context, |
michael@0 | 37 | const GrIndexBuffer* fLinesIndexBuffer, |
michael@0 | 38 | const GrIndexBuffer* fQuadsIndexBuffer); |
michael@0 | 39 | |
michael@0 | 40 | bool createLineGeom(const SkPath& path, |
michael@0 | 41 | GrDrawTarget* target, |
michael@0 | 42 | const PtArray& lines, |
michael@0 | 43 | int lineCnt, |
michael@0 | 44 | GrDrawTarget::AutoReleaseGeometry* arg, |
michael@0 | 45 | SkRect* devBounds); |
michael@0 | 46 | |
michael@0 | 47 | bool createBezierGeom(const SkPath& path, |
michael@0 | 48 | GrDrawTarget* target, |
michael@0 | 49 | const PtArray& quads, |
michael@0 | 50 | int quadCnt, |
michael@0 | 51 | const PtArray& conics, |
michael@0 | 52 | int conicCnt, |
michael@0 | 53 | const IntArray& qSubdivs, |
michael@0 | 54 | const FloatArray& cWeights, |
michael@0 | 55 | GrDrawTarget::AutoReleaseGeometry* arg, |
michael@0 | 56 | SkRect* devBounds); |
michael@0 | 57 | |
michael@0 | 58 | const GrIndexBuffer* fLinesIndexBuffer; |
michael@0 | 59 | const GrIndexBuffer* fQuadsIndexBuffer; |
michael@0 | 60 | |
michael@0 | 61 | typedef GrPathRenderer INHERITED; |
michael@0 | 62 | }; |
michael@0 | 63 | |
michael@0 | 64 | |
michael@0 | 65 | #endif |