gfx/skia/trunk/src/utils/win/SkDWriteGeometrySink.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 * Copyright 2012 Google Inc.
michael@0 3 *
michael@0 4 * Use of this source code is governed by a BSD-style license that can be
michael@0 5 * found in the LICENSE file.
michael@0 6 */
michael@0 7
michael@0 8 #ifndef SkDWriteToPath_DEFINED
michael@0 9 #define SkDWriteToPath_DEFINED
michael@0 10
michael@0 11 #include "SkTypes.h"
michael@0 12
michael@0 13 class SkPath;
michael@0 14
michael@0 15 #include <dwrite.h>
michael@0 16 #include <d2d1.h>
michael@0 17
michael@0 18 class SkDWriteGeometrySink : public IDWriteGeometrySink {
michael@0 19 private:
michael@0 20 LONG fRefCount;
michael@0 21 SkPath* fPath;
michael@0 22
michael@0 23 SkDWriteGeometrySink(const SkDWriteGeometrySink&);
michael@0 24 SkDWriteGeometrySink& operator=(const SkDWriteGeometrySink&);
michael@0 25
michael@0 26 protected:
michael@0 27 explicit SkDWriteGeometrySink(SkPath* path);
michael@0 28 virtual ~SkDWriteGeometrySink();
michael@0 29
michael@0 30 public:
michael@0 31 virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **object) SK_OVERRIDE;
michael@0 32 virtual ULONG STDMETHODCALLTYPE AddRef(void) SK_OVERRIDE;
michael@0 33 virtual ULONG STDMETHODCALLTYPE Release(void) SK_OVERRIDE;
michael@0 34
michael@0 35 virtual void STDMETHODCALLTYPE SetFillMode(D2D1_FILL_MODE fillMode) SK_OVERRIDE;
michael@0 36 virtual void STDMETHODCALLTYPE SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags) SK_OVERRIDE;
michael@0 37 virtual void STDMETHODCALLTYPE BeginFigure(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin) SK_OVERRIDE;
michael@0 38 virtual void STDMETHODCALLTYPE AddLines(const D2D1_POINT_2F *points, UINT pointsCount) SK_OVERRIDE;
michael@0 39 virtual void STDMETHODCALLTYPE AddBeziers(const D2D1_BEZIER_SEGMENT *beziers, UINT beziersCount) SK_OVERRIDE;
michael@0 40 virtual void STDMETHODCALLTYPE EndFigure(D2D1_FIGURE_END figureEnd) SK_OVERRIDE;
michael@0 41 virtual HRESULT STDMETHODCALLTYPE Close() SK_OVERRIDE;
michael@0 42
michael@0 43 static HRESULT Create(SkPath* path, IDWriteGeometrySink** geometryToPath);
michael@0 44 };
michael@0 45
michael@0 46 #endif

mercurial