OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 SkPictureRecord_DEFINED | 8 #ifndef SkPictureRecord_DEFINED |
9 #define SkPictureRecord_DEFINED | 9 #define SkPictureRecord_DEFINED |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 virtual int save(SaveFlags) SK_OVERRIDE; | 39 virtual int save(SaveFlags) SK_OVERRIDE; |
40 virtual int saveLayer(const SkRect* bounds, const SkPaint*, SaveFlags) SK_OV
ERRIDE; | 40 virtual int saveLayer(const SkRect* bounds, const SkPaint*, SaveFlags) SK_OV
ERRIDE; |
41 virtual void restore() SK_OVERRIDE; | 41 virtual void restore() SK_OVERRIDE; |
42 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; | 42 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; |
43 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE; | 43 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE; |
44 virtual bool rotate(SkScalar degrees) SK_OVERRIDE; | 44 virtual bool rotate(SkScalar degrees) SK_OVERRIDE; |
45 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE; | 45 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE; |
46 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE; | 46 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE; |
47 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE; | 47 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE; |
48 virtual bool clipRect(const SkRect&, SkRegion::Op, bool) SK_OVERRIDE; | |
49 virtual bool clipRRect(const SkRRect&, SkRegion::Op, bool) SK_OVERRIDE; | |
50 virtual bool clipPath(const SkPath&, SkRegion::Op, bool) SK_OVERRIDE; | |
51 virtual bool clipRegion(const SkRegion& region, SkRegion::Op op) SK_OVERRIDE
; | |
52 virtual void clear(SkColor) SK_OVERRIDE; | 48 virtual void clear(SkColor) SK_OVERRIDE; |
53 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; | 49 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; |
54 virtual void drawPoints(PointMode, size_t count, const SkPoint pts[], | 50 virtual void drawPoints(PointMode, size_t count, const SkPoint pts[], |
55 const SkPaint&) SK_OVERRIDE; | 51 const SkPaint&) SK_OVERRIDE; |
56 virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; | 52 virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE; |
57 virtual void drawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; | 53 virtual void drawRect(const SkRect&, const SkPaint&) SK_OVERRIDE; |
58 virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; | 54 virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE; |
59 virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE; | 55 virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE; |
60 virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top, | 56 virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top, |
61 const SkPaint*) SK_OVERRIDE; | 57 const SkPaint*) SK_OVERRIDE; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 217 |
222 protected: | 218 protected: |
223 virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE; | 219 virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE; |
224 const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE { | 220 const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE { |
225 return NULL; | 221 return NULL; |
226 } | 222 } |
227 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; | 223 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; |
228 virtual void onPushCull(const SkRect&) SK_OVERRIDE; | 224 virtual void onPushCull(const SkRect&) SK_OVERRIDE; |
229 virtual void onPopCull() SK_OVERRIDE; | 225 virtual void onPopCull() SK_OVERRIDE; |
230 | 226 |
| 227 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
| 228 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; |
| 229 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
| 230 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; |
| 231 |
231 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been | 232 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been |
232 // tweaked by paint.computeFastBounds(). | 233 // tweaked by paint.computeFastBounds(). |
233 static void ComputeFontMetricsTopBottom(const SkPaint& paint, SkScalar topbo
t[2]); | 234 static void ComputeFontMetricsTopBottom(const SkPaint& paint, SkScalar topbo
t[2]); |
234 | 235 |
235 // Make sure that flat has fTopBot written. | 236 // Make sure that flat has fTopBot written. |
236 static void WriteTopBot(const SkPaint& paint, const SkFlatData& flat) { | 237 static void WriteTopBot(const SkPaint& paint, const SkFlatData& flat) { |
237 if (!flat.isTopBotWritten()) { | 238 if (!flat.isTopBotWritten()) { |
238 ComputeFontMetricsTopBottom(paint, flat.writableTopBot()); | 239 ComputeFontMetricsTopBottom(paint, flat.writableTopBot()); |
239 SkASSERT(flat.isTopBotWritten()); | 240 SkASSERT(flat.isTopBotWritten()); |
240 } | 241 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 friend class SkPictureTester; // for unit testing | 293 friend class SkPictureTester; // for unit testing |
293 | 294 |
294 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE | 295 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE |
295 SkMatrixClipStateMgr fMCMgr; | 296 SkMatrixClipStateMgr fMCMgr; |
296 #endif | 297 #endif |
297 | 298 |
298 typedef SkCanvas INHERITED; | 299 typedef SkCanvas INHERITED; |
299 }; | 300 }; |
300 | 301 |
301 #endif | 302 #endif |
OLD | NEW |