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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 */ | 132 */ |
133 void setBitmapSizeThreshold(size_t sizeThreshold); | 133 void setBitmapSizeThreshold(size_t sizeThreshold); |
134 | 134 |
135 /** | 135 /** |
136 * Executes all pending commands without drawing | 136 * Executes all pending commands without drawing |
137 */ | 137 */ |
138 void silentFlush(); | 138 void silentFlush(); |
139 | 139 |
140 // Overrides of the SkCanvas interface | 140 // Overrides of the SkCanvas interface |
141 virtual bool isDrawingToLayer() const SK_OVERRIDE; | 141 virtual bool isDrawingToLayer() const SK_OVERRIDE; |
142 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; | |
143 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE; | |
144 virtual bool rotate(SkScalar degrees) SK_OVERRIDE; | |
145 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE; | |
146 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE; | |
147 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE; | |
148 virtual void clear(SkColor) SK_OVERRIDE; | 142 virtual void clear(SkColor) SK_OVERRIDE; |
149 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; | 143 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; |
150 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], | 144 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], |
151 const SkPaint& paint) SK_OVERRIDE; | 145 const SkPaint& paint) SK_OVERRIDE; |
152 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE; | 146 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE; |
153 virtual void drawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE; | 147 virtual void drawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE; |
154 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE; | 148 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE; |
155 virtual void drawPath(const SkPath& path, const SkPaint& paint) | 149 virtual void drawPath(const SkPath& path, const SkPaint& paint) |
156 SK_OVERRIDE; | 150 SK_OVERRIDE; |
157 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, | 151 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, |
(...skipping 28 matching lines...) Expand all Loading... |
186 const uint16_t indices[], int indexCount, | 180 const uint16_t indices[], int indexCount, |
187 const SkPaint& paint) SK_OVERRIDE; | 181 const SkPaint& paint) SK_OVERRIDE; |
188 virtual SkBounder* setBounder(SkBounder* bounder) SK_OVERRIDE; | 182 virtual SkBounder* setBounder(SkBounder* bounder) SK_OVERRIDE; |
189 virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE; | 183 virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE; |
190 | 184 |
191 protected: | 185 protected: |
192 virtual void willSave(SaveFlags) SK_OVERRIDE; | 186 virtual void willSave(SaveFlags) SK_OVERRIDE; |
193 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; | 187 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; |
194 virtual void willRestore() SK_OVERRIDE; | 188 virtual void willRestore() SK_OVERRIDE; |
195 | 189 |
| 190 virtual void didTranslate(SkScalar, SkScalar) SK_OVERRIDE; |
| 191 virtual void didScale(SkScalar, SkScalar) SK_OVERRIDE; |
| 192 virtual void didRotate(SkScalar) SK_OVERRIDE; |
| 193 virtual void didSkew(SkScalar, SkScalar) SK_OVERRIDE; |
| 194 virtual void didConcat(const SkMatrix&) SK_OVERRIDE; |
| 195 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE; |
| 196 |
196 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, | 197 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, |
197 const SkPaint&) SK_OVERRIDE; | 198 const SkPaint&) SK_OVERRIDE; |
198 | 199 |
199 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 200 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
200 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; | 201 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; |
201 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 202 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
202 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; | 203 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; |
203 | 204 |
204 public: | 205 public: |
205 class NotificationClient { | 206 class NotificationClient { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 void validate() const; | 249 void validate() const; |
249 void init(); | 250 void init(); |
250 bool fDeferredDrawing; | 251 bool fDeferredDrawing; |
251 | 252 |
252 friend class SkDeferredCanvasTester; // for unit testing | 253 friend class SkDeferredCanvasTester; // for unit testing |
253 typedef SkCanvas INHERITED; | 254 typedef SkCanvas INHERITED; |
254 }; | 255 }; |
255 | 256 |
256 | 257 |
257 #endif | 258 #endif |
OLD | NEW |