OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkAndroidSDKCanvas_DEFINED | 8 #ifndef SkAndroidSDKCanvas_DEFINED |
9 #define SkAndroidSDKCanvas_DEFINED | 9 #define SkAndroidSDKCanvas_DEFINED |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 class SkAndroidSDKCanvas : public SkCanvas { | 27 class SkAndroidSDKCanvas : public SkCanvas { |
28 public: | 28 public: |
29 SkAndroidSDKCanvas(); | 29 SkAndroidSDKCanvas(); |
30 void reset(SkCanvas* newTarget); | 30 void reset(SkCanvas* newTarget); |
31 | 31 |
32 protected: | 32 protected: |
33 | 33 |
34 // FILTERING | 34 // FILTERING |
35 | 35 |
36 void onDrawPaint(const SkPaint& paint) SK_OVERRIDE; | 36 void onDrawPaint(const SkPaint& paint) override; |
37 void onDrawPoints(PointMode pMode, size_t count, const SkPoint pts[], | 37 void onDrawPoints(PointMode pMode, size_t count, const SkPoint pts[], |
38 const SkPaint& paint) SK_OVERRIDE; | 38 const SkPaint& paint) override; |
39 void onDrawOval(const SkRect& r, const SkPaint& paint) SK_OVERRIDE; | 39 void onDrawOval(const SkRect& r, const SkPaint& paint) override; |
40 void onDrawRect(const SkRect& r, const SkPaint& paint) SK_OVERRIDE; | 40 void onDrawRect(const SkRect& r, const SkPaint& paint) override; |
41 void onDrawRRect(const SkRRect& r, const SkPaint& paint) SK_OVERRIDE; | 41 void onDrawRRect(const SkRRect& r, const SkPaint& paint) override; |
42 void onDrawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE; | 42 void onDrawPath(const SkPath& path, const SkPaint& paint) override; |
43 void onDrawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, | 43 void onDrawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, |
44 const SkPaint* paint) SK_OVERRIDE; | 44 const SkPaint* paint) override; |
45 void onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRec
t& dst, | 45 void onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRec
t& dst, |
46 const SkPaint* paint, DrawBitmapRectFlags flags) SK_OV
ERRIDE; | 46 const SkPaint* paint, DrawBitmapRectFlags flags) overr
ide; |
47 void onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, | 47 void onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, |
48 const SkRect& dst, const SkPaint* paint) SK_OVERRIDE; | 48 const SkRect& dst, const SkPaint* paint) override; |
49 void onDrawSprite(const SkBitmap& bitmap, int left, int top, | 49 void onDrawSprite(const SkBitmap& bitmap, int left, int top, |
50 const SkPaint* paint) SK_OVERRIDE; | 50 const SkPaint* paint) override; |
51 void onDrawVertices(VertexMode vMode, int vertexCount, const SkPoint vertice
s[], | 51 void onDrawVertices(VertexMode vMode, int vertexCount, const SkPoint vertice
s[], |
52 const SkPoint texs[], const SkColor colors[], SkXfermode
* xMode, | 52 const SkPoint texs[], const SkColor colors[], SkXfermode
* xMode, |
53 const uint16_t indices[], int indexCount, | 53 const uint16_t indices[], int indexCount, |
54 const SkPaint& paint) SK_OVERRIDE; | 54 const SkPaint& paint) override; |
55 | 55 |
56 void onDrawDRRect(const SkRRect& outer, const SkRRect& inner, | 56 void onDrawDRRect(const SkRRect& outer, const SkRRect& inner, |
57 const SkPaint& paint) SK_OVERRIDE; | 57 const SkPaint& paint) override; |
58 | 58 |
59 void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, | 59 void onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, |
60 const SkPaint& paint) SK_OVERRIDE; | 60 const SkPaint& paint) override; |
61 void onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[], | 61 void onDrawPosText(const void* text, size_t byteLength, const SkPoint pos[], |
62 const SkPaint& paint) SK_OVERRIDE; | 62 const SkPaint& paint) override; |
63 void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos
[], | 63 void onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos
[], |
64 SkScalar constY, const SkPaint& paint) SK_OVERRIDE; | 64 SkScalar constY, const SkPaint& paint) override; |
65 void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& pat
h, | 65 void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& pat
h, |
66 const SkMatrix* matrix, const SkPaint& paint) SK_OVERR
IDE; | 66 const SkMatrix* matrix, const SkPaint& paint) override
; |
67 void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, | 67 void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, |
68 const SkPaint& paint) SK_OVERRIDE; | 68 const SkPaint& paint) override; |
69 | 69 |
70 void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], | 70 void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |
71 const SkPoint texCoords[4], SkXfermode* xmode, | 71 const SkPoint texCoords[4], SkXfermode* xmode, |
72 const SkPaint& paint) SK_OVERRIDE; | 72 const SkPaint& paint) override; |
73 | 73 |
74 void onDrawImage(const SkImage*, SkScalar, SkScalar, const SkPaint*) SK_OVER
RIDE; | 74 void onDrawImage(const SkImage*, SkScalar, SkScalar, const SkPaint*) overrid
e; |
75 void onDrawImageRect(const SkImage*, const SkRect*, const SkRect&, const SkP
aint*) | 75 void onDrawImageRect(const SkImage*, const SkRect*, const SkRect&, const SkP
aint*) |
76 SK_OVERRIDE; | 76 override; |
77 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*); | 77 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*); |
78 | 78 |
79 // PASS THROUGH | 79 // PASS THROUGH |
80 | 80 |
81 void onDrawDrawable(SkDrawable*) SK_OVERRIDE; | 81 void onDrawDrawable(SkDrawable*) override; |
82 SkISize getBaseLayerSize() const SK_OVERRIDE; | 82 SkISize getBaseLayerSize() const override; |
83 bool getClipBounds(SkRect*) const SK_OVERRIDE; | 83 bool getClipBounds(SkRect*) const override; |
84 bool getClipDeviceBounds(SkIRect*) const SK_OVERRIDE; | 84 bool getClipDeviceBounds(SkIRect*) const override; |
85 bool isClipEmpty() const SK_OVERRIDE; | 85 bool isClipEmpty() const override; |
86 bool isClipRect() const SK_OVERRIDE; | 86 bool isClipRect() const override; |
87 SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) SK_OVERRI
DE; | 87 SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override; |
88 const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE; | 88 const void* onPeekPixels(SkImageInfo*, size_t*) override; |
89 void* onAccessTopLayerPixels(SkImageInfo*, size_t*) SK_OVERRIDE; | 89 void* onAccessTopLayerPixels(SkImageInfo*, size_t*) override; |
90 void willSave() SK_OVERRIDE; | 90 void willSave() override; |
91 void willRestore() SK_OVERRIDE; | 91 void willRestore() override; |
92 void didRestore() SK_OVERRIDE; | 92 void didRestore() override; |
93 void didConcat(const SkMatrix&) SK_OVERRIDE; | 93 void didConcat(const SkMatrix&) override; |
94 void didSetMatrix(const SkMatrix&) SK_OVERRIDE; | 94 void didSetMatrix(const SkMatrix&) override; |
95 void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; | 95 void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; |
96 void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; | 96 void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; |
97 void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; | 97 void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; |
98 void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; | 98 void onClipRegion(const SkRegion&, SkRegion::Op) override; |
99 void onDiscard() SK_OVERRIDE; | 99 void onDiscard() override; |
100 | 100 |
101 protected: | 101 protected: |
102 SkCanvas* fProxyTarget; | 102 SkCanvas* fProxyTarget; |
103 }; | 103 }; |
104 | 104 |
105 #endif // SkAndroidSDKCanvas_DEFINED | 105 #endif // SkAndroidSDKCanvas_DEFINED |
106 | 106 |
OLD | NEW |