OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 SkDeferredCanvas_DEFINED | 8 #ifndef SkDeferredCanvas_DEFINED |
9 #define SkDeferredCanvas_DEFINED | 9 #define SkDeferredCanvas_DEFINED |
10 | 10 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 const SkRect& dst, const SkPaint* paint, | 155 const SkRect& dst, const SkPaint* paint, |
156 DrawBitmapRectFlags flags) SK_OVERRIDE; | 156 DrawBitmapRectFlags flags) SK_OVERRIDE; |
157 | 157 |
158 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, | 158 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, |
159 const SkPaint* paint) SK_OVERRIDE; | 159 const SkPaint* paint) SK_OVERRIDE; |
160 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, | 160 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, |
161 const SkRect& dst, const SkPaint* paint) | 161 const SkRect& dst, const SkPaint* paint) |
162 SK_OVERRIDE; | 162 SK_OVERRIDE; |
163 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, | 163 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, |
164 const SkPaint* paint) SK_OVERRIDE; | 164 const SkPaint* paint) SK_OVERRIDE; |
165 virtual void drawPicture(SkPicture& picture) SK_OVERRIDE; | |
166 virtual void drawVertices(VertexMode vmode, int vertexCount, | 165 virtual void drawVertices(VertexMode vmode, int vertexCount, |
167 const SkPoint vertices[], const SkPoint texs[], | 166 const SkPoint vertices[], const SkPoint texs[], |
168 const SkColor colors[], SkXfermode* xmode, | 167 const SkColor colors[], SkXfermode* xmode, |
169 const uint16_t indices[], int indexCount, | 168 const uint16_t indices[], int indexCount, |
170 const SkPaint& paint) SK_OVERRIDE; | 169 const SkPaint& paint) SK_OVERRIDE; |
171 virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE; | 170 virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE; |
172 | 171 |
173 protected: | 172 protected: |
174 virtual void willSave(SaveFlags) SK_OVERRIDE; | 173 virtual void willSave(SaveFlags) SK_OVERRIDE; |
175 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; | 174 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; |
(...skipping 10 matching lines...) Expand all Loading... |
186 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], | 185 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], |
187 SkScalar constY, const SkPaint&) SK_OVERRIDE; | 186 SkScalar constY, const SkPaint&) SK_OVERRIDE; |
188 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, | 187 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, |
189 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; | 188 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; |
190 | 189 |
191 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 190 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
192 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; | 191 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; |
193 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 192 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
194 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; | 193 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; |
195 | 194 |
| 195 virtual void onDrawPicture(const SkPicture* picture) SK_OVERRIDE; |
| 196 |
196 public: | 197 public: |
197 class NotificationClient { | 198 class NotificationClient { |
198 public: | 199 public: |
199 virtual ~NotificationClient() {} | 200 virtual ~NotificationClient() {} |
200 | 201 |
201 /** | 202 /** |
202 * Called before executing one or several draw commands, which means | 203 * Called before executing one or several draw commands, which means |
203 * once per flush when deferred rendering is enabled. | 204 * once per flush when deferred rendering is enabled. |
204 */ | 205 */ |
205 virtual void prepareForDraw() {} | 206 virtual void prepareForDraw() {} |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 void validate() const; | 241 void validate() const; |
241 void init(); | 242 void init(); |
242 bool fDeferredDrawing; | 243 bool fDeferredDrawing; |
243 | 244 |
244 friend class SkDeferredCanvasTester; // for unit testing | 245 friend class SkDeferredCanvasTester; // for unit testing |
245 typedef SkCanvas INHERITED; | 246 typedef SkCanvas INHERITED; |
246 }; | 247 }; |
247 | 248 |
248 | 249 |
249 #endif | 250 #endif |
OLD | NEW |