gfx/skia/trunk/src/core/SkEdgeBuilder.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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 #ifndef SkEdgeBuilder_DEFINED
michael@0 9 #define SkEdgeBuilder_DEFINED
michael@0 10
michael@0 11 #include "SkChunkAlloc.h"
michael@0 12 #include "SkRect.h"
michael@0 13 #include "SkTDArray.h"
michael@0 14
michael@0 15 struct SkEdge;
michael@0 16 class SkEdgeClipper;
michael@0 17 class SkPath;
michael@0 18
michael@0 19 class SkEdgeBuilder {
michael@0 20 public:
michael@0 21 SkEdgeBuilder();
michael@0 22
michael@0 23 // returns the number of built edges. The array of those edge pointers
michael@0 24 // is returned from edgeList().
michael@0 25 int build(const SkPath& path, const SkIRect* clip, int shiftUp);
michael@0 26
michael@0 27 SkEdge** edgeList() { return fEdgeList; }
michael@0 28
michael@0 29 private:
michael@0 30 SkChunkAlloc fAlloc;
michael@0 31 SkTDArray<SkEdge*> fList;
michael@0 32
michael@0 33 /*
michael@0 34 * If we're in general mode, we allcoate the pointers in fList, and this
michael@0 35 * will point at fList.begin(). If we're in polygon mode, fList will be
michael@0 36 * empty, as we will have preallocated room for the pointers in fAlloc's
michael@0 37 * block, and fEdgeList will point into that.
michael@0 38 */
michael@0 39 SkEdge** fEdgeList;
michael@0 40
michael@0 41 int fShiftUp;
michael@0 42
michael@0 43 public:
michael@0 44 void addLine(const SkPoint pts[]);
michael@0 45 void addQuad(const SkPoint pts[]);
michael@0 46 void addCubic(const SkPoint pts[]);
michael@0 47 void addClipper(SkEdgeClipper*);
michael@0 48
michael@0 49 int buildPoly(const SkPath& path, const SkIRect* clip, int shiftUp);
michael@0 50 };
michael@0 51
michael@0 52 #endif

mercurial