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.
1 /*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
8 #ifndef GrOvalRenderer_DEFINED
9 #define GrOvalRenderer_DEFINED
11 #include "GrContext.h"
12 #include "GrPaint.h"
14 class GrContext;
15 class GrDrawTarget;
16 class GrPaint;
17 struct SkRect;
18 class SkStrokeRec;
20 /*
21 * This class wraps helper functions that draw ovals and roundrects (filled & stroked)
22 */
23 class GrOvalRenderer : public SkRefCnt {
24 public:
25 SK_DECLARE_INST_COUNT(GrOvalRenderer)
27 GrOvalRenderer() : fRRectIndexBuffer(NULL) {}
28 ~GrOvalRenderer() {
29 this->reset();
30 }
32 void reset();
34 bool drawOval(GrDrawTarget* target, const GrContext* context, bool useAA,
35 const SkRect& oval, const SkStrokeRec& stroke);
36 bool drawSimpleRRect(GrDrawTarget* target, GrContext* context, bool useAA,
37 const SkRRect& rrect, const SkStrokeRec& stroke);
39 private:
40 bool drawEllipse(GrDrawTarget* target, bool useCoverageAA,
41 const SkRect& ellipse,
42 const SkStrokeRec& stroke);
43 bool drawDIEllipse(GrDrawTarget* target, bool useCoverageAA,
44 const SkRect& ellipse,
45 const SkStrokeRec& stroke);
46 void drawCircle(GrDrawTarget* target, bool useCoverageAA,
47 const SkRect& circle,
48 const SkStrokeRec& stroke);
50 GrIndexBuffer* rRectIndexBuffer(GrGpu* gpu);
52 GrIndexBuffer* fRRectIndexBuffer;
54 typedef SkRefCnt INHERITED;
55 };
57 #endif // GrOvalRenderer_DEFINED