| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 protected: | 216 protected: |
| 217 virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE; | 217 virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE; |
| 218 const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE { | 218 const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE { |
| 219 return NULL; | 219 return NULL; |
| 220 } | 220 } |
| 221 | 221 |
| 222 virtual void willSave(SaveFlags) SK_OVERRIDE; | 222 virtual void willSave(SaveFlags) SK_OVERRIDE; |
| 223 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; | 223 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; |
| 224 virtual void willRestore() SK_OVERRIDE; | 224 virtual void willRestore() SK_OVERRIDE; |
| 225 | 225 |
| 226 virtual void didTranslate(SkScalar, SkScalar) SK_OVERRIDE; | |
| 227 virtual void didScale(SkScalar, SkScalar) SK_OVERRIDE; | |
| 228 virtual void didRotate(SkScalar) SK_OVERRIDE; | |
| 229 virtual void didSkew(SkScalar, SkScalar) SK_OVERRIDE; | |
| 230 virtual void didConcat(const SkMatrix&) SK_OVERRIDE; | 226 virtual void didConcat(const SkMatrix&) SK_OVERRIDE; |
| 231 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE; | 227 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE; |
| 232 | 228 |
| 233 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; | 229 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; |
| 234 virtual void onPushCull(const SkRect&) SK_OVERRIDE; | 230 virtual void onPushCull(const SkRect&) SK_OVERRIDE; |
| 235 virtual void onPopCull() SK_OVERRIDE; | 231 virtual void onPopCull() SK_OVERRIDE; |
| 236 | 232 |
| 237 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 233 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
| 238 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; | 234 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; |
| 239 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 235 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 259 void drawPosTextHImpl(const void* text, size_t byteLength, | 255 void drawPosTextHImpl(const void* text, size_t byteLength, |
| 260 const SkScalar xpos[], SkScalar constY, | 256 const SkScalar xpos[], SkScalar constY, |
| 261 const SkPaint& paint, const SkFlatData* flatPaintData)
; | 257 const SkPaint& paint, const SkFlatData* flatPaintData)
; |
| 262 | 258 |
| 263 int addPathToHeap(const SkPath& path); // does not write to ops stream | 259 int addPathToHeap(const SkPath& path); // does not write to ops stream |
| 264 | 260 |
| 265 // These entry points allow the writing of matrices, clips, saves & | 261 // These entry points allow the writing of matrices, clips, saves & |
| 266 // restores to be deferred (e.g., if the MC state is being collapsed and | 262 // restores to be deferred (e.g., if the MC state is being collapsed and |
| 267 // only written out as needed). | 263 // only written out as needed). |
| 268 void recordConcat(const SkMatrix& matrix); | 264 void recordConcat(const SkMatrix& matrix); |
| 265 void recordTranslate(const SkMatrix& matrix); |
| 266 void recordScale(const SkMatrix& matrix); |
| 269 int recordClipRect(const SkRect& rect, SkRegion::Op op, bool doAA); | 267 int recordClipRect(const SkRect& rect, SkRegion::Op op, bool doAA); |
| 270 int recordClipRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA); | 268 int recordClipRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA); |
| 271 int recordClipPath(int pathID, SkRegion::Op op, bool doAA); | 269 int recordClipPath(int pathID, SkRegion::Op op, bool doAA); |
| 272 int recordClipRegion(const SkRegion& region, SkRegion::Op op); | 270 int recordClipRegion(const SkRegion& region, SkRegion::Op op); |
| 273 void recordSave(SaveFlags flags); | 271 void recordSave(SaveFlags flags); |
| 274 void recordSaveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags f
lags); | 272 void recordSaveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags f
lags); |
| 275 void recordRestore(bool fillInSkips = true); | 273 void recordRestore(bool fillInSkips = true); |
| 276 | 274 |
| 277 // These are set to NULL in our constructor, but may be changed by | 275 // These are set to NULL in our constructor, but may be changed by |
| 278 // subclasses, in which case they will be SkSafeUnref'd in our destructor. | 276 // subclasses, in which case they will be SkSafeUnref'd in our destructor. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 306 friend class SkPictureTester; // for unit testing | 304 friend class SkPictureTester; // for unit testing |
| 307 | 305 |
| 308 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE | 306 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE |
| 309 SkMatrixClipStateMgr fMCMgr; | 307 SkMatrixClipStateMgr fMCMgr; |
| 310 #endif | 308 #endif |
| 311 | 309 |
| 312 typedef SkCanvas INHERITED; | 310 typedef SkCanvas INHERITED; |
| 313 }; | 311 }; |
| 314 | 312 |
| 315 #endif | 313 #endif |
| OLD | NEW |