gfx/skia/trunk/include/utils/SkNWayCanvas.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
michael@0 9 #ifndef SkNWayCanvas_DEFINED
michael@0 10 #define SkNWayCanvas_DEFINED
michael@0 11
michael@0 12 #include "SkCanvas.h"
michael@0 13
michael@0 14 class SK_API SkNWayCanvas : public SkCanvas {
michael@0 15 public:
michael@0 16 SkNWayCanvas(int width, int height);
michael@0 17 virtual ~SkNWayCanvas();
michael@0 18
michael@0 19 virtual void addCanvas(SkCanvas*);
michael@0 20 virtual void removeCanvas(SkCanvas*);
michael@0 21 virtual void removeAll();
michael@0 22
michael@0 23 ///////////////////////////////////////////////////////////////////////////
michael@0 24 // These are forwarded to the N canvases we're referencing
michael@0 25
michael@0 26 virtual void clear(SkColor) SK_OVERRIDE;
michael@0 27 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
michael@0 28 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
michael@0 29 const SkPaint&) SK_OVERRIDE;
michael@0 30 virtual void drawRect(const SkRect&, const SkPaint&) SK_OVERRIDE;
michael@0 31 virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE;
michael@0 32 virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE;
michael@0 33 virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
michael@0 34 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
michael@0 35 const SkPaint*) SK_OVERRIDE;
michael@0 36 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
michael@0 37 const SkRect& dst, const SkPaint* paint,
michael@0 38 DrawBitmapRectFlags flags) SK_OVERRIDE;
michael@0 39 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
michael@0 40 const SkPaint*) SK_OVERRIDE;
michael@0 41 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
michael@0 42 const SkRect& dst,
michael@0 43 const SkPaint* paint = NULL) SK_OVERRIDE;
michael@0 44 virtual void drawSprite(const SkBitmap& bitmap, int left, int top,
michael@0 45 const SkPaint*) SK_OVERRIDE;
michael@0 46 virtual void drawText(const void* text, size_t byteLength, SkScalar x,
michael@0 47 SkScalar y, const SkPaint&) SK_OVERRIDE;
michael@0 48 virtual void drawPosText(const void* text, size_t byteLength,
michael@0 49 const SkPoint pos[], const SkPaint&) SK_OVERRIDE;
michael@0 50 virtual void drawPosTextH(const void* text, size_t byteLength,
michael@0 51 const SkScalar xpos[], SkScalar constY,
michael@0 52 const SkPaint&) SK_OVERRIDE;
michael@0 53 virtual void drawTextOnPath(const void* text, size_t byteLength,
michael@0 54 const SkPath& path, const SkMatrix* matrix,
michael@0 55 const SkPaint&) SK_OVERRIDE;
michael@0 56 virtual void drawPicture(SkPicture&) SK_OVERRIDE;
michael@0 57 virtual void drawVertices(VertexMode vmode, int vertexCount,
michael@0 58 const SkPoint vertices[], const SkPoint texs[],
michael@0 59 const SkColor colors[], SkXfermode* xmode,
michael@0 60 const uint16_t indices[], int indexCount,
michael@0 61 const SkPaint&) SK_OVERRIDE;
michael@0 62 virtual void drawData(const void* data, size_t length) SK_OVERRIDE;
michael@0 63
michael@0 64 virtual SkBounder* setBounder(SkBounder*) SK_OVERRIDE;
michael@0 65 virtual SkDrawFilter* setDrawFilter(SkDrawFilter*) SK_OVERRIDE;
michael@0 66
michael@0 67 virtual void beginCommentGroup(const char* description) SK_OVERRIDE;
michael@0 68 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE;
michael@0 69 virtual void endCommentGroup() SK_OVERRIDE;
michael@0 70
michael@0 71 protected:
michael@0 72 SkTDArray<SkCanvas*> fList;
michael@0 73
michael@0 74 virtual void willSave(SaveFlags) SK_OVERRIDE;
michael@0 75 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK_OVERRIDE;
michael@0 76 virtual void willRestore() SK_OVERRIDE;
michael@0 77
michael@0 78 virtual void didTranslate(SkScalar, SkScalar) SK_OVERRIDE;
michael@0 79 virtual void didScale(SkScalar, SkScalar) SK_OVERRIDE;
michael@0 80 virtual void didRotate(SkScalar) SK_OVERRIDE;
michael@0 81 virtual void didSkew(SkScalar, SkScalar) SK_OVERRIDE;
michael@0 82 virtual void didConcat(const SkMatrix&) SK_OVERRIDE;
michael@0 83 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE;
michael@0 84
michael@0 85 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRIDE;
michael@0 86
michael@0 87 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE;
michael@0 88 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE;
michael@0 89 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE;
michael@0 90 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
michael@0 91
michael@0 92 class Iter;
michael@0 93
michael@0 94 private:
michael@0 95 typedef SkCanvas INHERITED;
michael@0 96 };
michael@0 97
michael@0 98
michael@0 99 #endif

mercurial