OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 SkRecorder_DEFINED | 8 #ifndef SkRecorder_DEFINED |
9 #define SkRecorder_DEFINED | 9 #define SkRecorder_DEFINED |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 // Does not take ownership of the SkRecord. | 38 // Does not take ownership of the SkRecord. |
39 SkRecorder(SkRecord*, int width, int height); // legacy version | 39 SkRecorder(SkRecord*, int width, int height); // legacy version |
40 SkRecorder(SkRecord*, const SkRect& bounds); | 40 SkRecorder(SkRecord*, const SkRect& bounds); |
41 | 41 |
42 SkCanvasDrawableList* getDrawableList() const { return fDrawableList.get();
} | 42 SkCanvasDrawableList* getDrawableList() const { return fDrawableList.get();
} |
43 SkCanvasDrawableList* detachDrawableList() { return fDrawableList.detach();
} | 43 SkCanvasDrawableList* detachDrawableList() { return fDrawableList.detach();
} |
44 | 44 |
45 // Make SkRecorder forget entirely about its SkRecord*; all calls to SkRecor
der will fail. | 45 // Make SkRecorder forget entirely about its SkRecord*; all calls to SkRecor
der will fail. |
46 void forgetRecord(); | 46 void forgetRecord(); |
47 | 47 |
48 void drawPaint(const SkPaint& paint) SK_OVERRIDE; | |
49 void drawPoints(PointMode mode, | |
50 size_t count, | |
51 const SkPoint pts[], | |
52 const SkPaint& paint) SK_OVERRIDE; | |
53 void drawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE; | |
54 void drawOval(const SkRect& oval, const SkPaint&) SK_OVERRIDE; | |
55 void drawRRect(const SkRRect& rrect, const SkPaint& paint) SK_OVERRIDE; | |
56 void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE; | |
57 void drawBitmap(const SkBitmap& bitmap, | |
58 SkScalar left, | |
59 SkScalar top, | |
60 const SkPaint* paint = NULL) SK_OVERRIDE; | |
61 void drawBitmapRectToRect(const SkBitmap& bitmap, | |
62 const SkRect* src, | |
63 const SkRect& dst, | |
64 const SkPaint* paint = NULL, | |
65 DrawBitmapRectFlags flags = kNone_DrawBitmapRectFl
ag) SK_OVERRIDE; | |
66 void drawBitmapNine(const SkBitmap& bitmap, | |
67 const SkIRect& center, | |
68 const SkRect& dst, | |
69 const SkPaint* paint = NULL) SK_OVERRIDE; | |
70 virtual void drawImage(const SkImage* image, SkScalar left, SkScalar top, | |
71 const SkPaint* paint = NULL) SK_OVERRIDE; | |
72 virtual void drawImageRect(const SkImage* image, const SkRect* src, | |
73 const SkRect& dst, | |
74 const SkPaint* paint = NULL) SK_OVERRIDE; | |
75 void drawSprite(const SkBitmap& bitmap, | |
76 int left, | |
77 int top, | |
78 const SkPaint* paint = NULL) SK_OVERRIDE; | |
79 void drawVertices(VertexMode vmode, | |
80 int vertexCount, | |
81 const SkPoint vertices[], | |
82 const SkPoint texs[], | |
83 const SkColor colors[], | |
84 SkXfermode* xmode, | |
85 const uint16_t indices[], | |
86 int indexCount, | |
87 const SkPaint& paint) SK_OVERRIDE; | |
88 | |
89 void willSave() SK_OVERRIDE; | 48 void willSave() SK_OVERRIDE; |
90 SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SkCanvas::Sav
eFlags) SK_OVERRIDE; | 49 SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SkCanvas::Sav
eFlags) SK_OVERRIDE; |
91 void willRestore() SK_OVERRIDE {} | 50 void willRestore() SK_OVERRIDE {} |
92 void didRestore() SK_OVERRIDE; | 51 void didRestore() SK_OVERRIDE; |
93 | 52 |
94 void didConcat(const SkMatrix&) SK_OVERRIDE; | 53 void didConcat(const SkMatrix&) SK_OVERRIDE; |
95 void didSetMatrix(const SkMatrix&) SK_OVERRIDE; | 54 void didSetMatrix(const SkMatrix&) SK_OVERRIDE; |
96 | 55 |
97 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRID
E; | 56 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRID
E; |
98 void onDrawDrawable(SkCanvasDrawable*) SK_OVERRIDE; | 57 void onDrawDrawable(SkCanvasDrawable*) SK_OVERRIDE; |
(...skipping 17 matching lines...) Expand all Loading... |
116 const SkMatrix* matrix, | 75 const SkMatrix* matrix, |
117 const SkPaint& paint) SK_OVERRIDE; | 76 const SkPaint& paint) SK_OVERRIDE; |
118 void onDrawTextBlob(const SkTextBlob* blob, | 77 void onDrawTextBlob(const SkTextBlob* blob, |
119 SkScalar x, | 78 SkScalar x, |
120 SkScalar y, | 79 SkScalar y, |
121 const SkPaint& paint) SK_OVERRIDE; | 80 const SkPaint& paint) SK_OVERRIDE; |
122 void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], | 81 void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |
123 const SkPoint texCoords[4], SkXfermode* xmode, | 82 const SkPoint texCoords[4], SkXfermode* xmode, |
124 const SkPaint& paint) SK_OVERRIDE; | 83 const SkPaint& paint) SK_OVERRIDE; |
125 | 84 |
| 85 void onDrawPaint(const SkPaint&) SK_OVERRIDE; |
| 86 void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPain
t&) SK_OVERRIDE; |
| 87 void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; |
| 88 void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; |
| 89 void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; |
| 90 void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE; |
| 91 void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPain
t*) SK_OVERRIDE; |
| 92 void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst,
const SkPaint*, |
| 93 DrawBitmapRectFlags flags) SK_OVERRIDE; |
| 94 void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*
) SK_OVERRIDE; |
| 95 void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, |
| 96 const SkPaint*) SK_OVERRIDE; |
| 97 void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect&
dst, |
| 98 const SkPaint*) SK_OVERRIDE; |
| 99 void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVE
RRIDE; |
| 100 void onDrawVertices(VertexMode vmode, int vertexCount, |
| 101 const SkPoint vertices[], const SkPoint texs[], |
| 102 const SkColor colors[], SkXfermode* xmode, |
| 103 const uint16_t indices[], int indexCount, |
| 104 const SkPaint&) SK_OVERRIDE; |
| 105 |
126 void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle
) SK_OVERRIDE; | 106 void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle
) SK_OVERRIDE; |
127 void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeSt
yle) SK_OVERRIDE; | 107 void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeSt
yle) SK_OVERRIDE; |
128 void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle
) SK_OVERRIDE; | 108 void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle
) SK_OVERRIDE; |
129 void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) SK_OVERRIDE; | 109 void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) SK_OVERRIDE; |
130 | 110 |
131 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVE
RRIDE; | 111 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVE
RRIDE; |
132 | 112 |
133 void beginCommentGroup(const char*) SK_OVERRIDE; | 113 void beginCommentGroup(const char*) SK_OVERRIDE; |
134 void addComment(const char*, const char*) SK_OVERRIDE; | 114 void addComment(const char*, const char*) SK_OVERRIDE; |
135 void endCommentGroup() SK_OVERRIDE; | 115 void endCommentGroup() SK_OVERRIDE; |
(...skipping 12 matching lines...) Expand all Loading... |
148 this->getClipDeviceBounds(&devBounds); | 128 this->getClipDeviceBounds(&devBounds); |
149 return devBounds; | 129 return devBounds; |
150 } | 130 } |
151 | 131 |
152 SkRecord* fRecord; | 132 SkRecord* fRecord; |
153 | 133 |
154 SkAutoTDelete<SkCanvasDrawableList> fDrawableList; | 134 SkAutoTDelete<SkCanvasDrawableList> fDrawableList; |
155 }; | 135 }; |
156 | 136 |
157 #endif//SkRecorder_DEFINED | 137 #endif//SkRecorder_DEFINED |
OLD | NEW |