| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 const SkPaint*) SK_OVERRIDE; | 54 const SkPaint*) SK_OVERRIDE; |
| 55 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, | 55 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, |
| 56 const SkRect& dst, const SkPaint*) SK_OVERRIDE; | 56 const SkRect& dst, const SkPaint*) SK_OVERRIDE; |
| 57 virtual void drawSprite(const SkBitmap&, int left, int top, | 57 virtual void drawSprite(const SkBitmap&, int left, int top, |
| 58 const SkPaint*) SK_OVERRIDE; | 58 const SkPaint*) SK_OVERRIDE; |
| 59 virtual void drawVertices(VertexMode, int vertexCount, | 59 virtual void drawVertices(VertexMode, int vertexCount, |
| 60 const SkPoint vertices[], const SkPoint texs[], | 60 const SkPoint vertices[], const SkPoint texs[], |
| 61 const SkColor colors[], SkXfermode*, | 61 const SkColor colors[], SkXfermode*, |
| 62 const uint16_t indices[], int indexCount, | 62 const uint16_t indices[], int indexCount, |
| 63 const SkPaint&) SK_OVERRIDE; | 63 const SkPaint&) SK_OVERRIDE; |
| 64 virtual void drawPatch(const SkPatch& patch, const SkPaint& paint) SK_OVERRI
DE; | |
| 65 virtual void drawData(const void*, size_t) SK_OVERRIDE; | 64 virtual void drawData(const void*, size_t) SK_OVERRIDE; |
| 66 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; | 65 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; |
| 67 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; | 66 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; |
| 68 virtual void endCommentGroup() SK_OVERRIDE; | 67 virtual void endCommentGroup() SK_OVERRIDE; |
| 69 virtual bool isDrawingToLayer() const SK_OVERRIDE; | 68 virtual bool isDrawingToLayer() const SK_OVERRIDE; |
| 70 | 69 |
| 71 void addFontMetricsTopBottom(const SkPaint& paint, const SkFlatData&, | 70 void addFontMetricsTopBottom(const SkPaint& paint, const SkFlatData&, |
| 72 SkScalar minY, SkScalar maxY); | 71 SkScalar minY, SkScalar maxY); |
| 73 | 72 |
| 74 const SkTDArray<const SkPicture* >& getPictureRefs() const { | 73 const SkTDArray<const SkPicture* >& getPictureRefs() const { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 void addScalar(SkScalar scalar) { | 171 void addScalar(SkScalar scalar) { |
| 173 fWriter.writeScalar(scalar); | 172 fWriter.writeScalar(scalar); |
| 174 } | 173 } |
| 175 | 174 |
| 176 // The command at 'offset' in the skp uses the specified bitmap | 175 // The command at 'offset' in the skp uses the specified bitmap |
| 177 int addBitmap(const SkBitmap& bitmap); | 176 int addBitmap(const SkBitmap& bitmap); |
| 178 void addMatrix(const SkMatrix& matrix); | 177 void addMatrix(const SkMatrix& matrix); |
| 179 const SkFlatData* addPaint(const SkPaint& paint) { return this->addPaintPtr(
&paint); } | 178 const SkFlatData* addPaint(const SkPaint& paint) { return this->addPaintPtr(
&paint); } |
| 180 const SkFlatData* addPaintPtr(const SkPaint* paint); | 179 const SkFlatData* addPaintPtr(const SkPaint* paint); |
| 181 void addFlatPaint(const SkFlatData* flatPaint); | 180 void addFlatPaint(const SkFlatData* flatPaint); |
| 182 void addPatch(const SkPatch& patch); | 181 void addPatch(const SkPoint cubics[12]); |
| 183 void addPath(const SkPath& path); | 182 void addPath(const SkPath& path); |
| 184 void addPicture(const SkPicture* picture); | 183 void addPicture(const SkPicture* picture); |
| 185 void addPoint(const SkPoint& point); | 184 void addPoint(const SkPoint& point); |
| 186 void addPoints(const SkPoint pts[], int count); | 185 void addPoints(const SkPoint pts[], int count); |
| 187 void addRect(const SkRect& rect); | 186 void addRect(const SkRect& rect); |
| 188 void addRectPtr(const SkRect* rect); | 187 void addRectPtr(const SkRect* rect); |
| 189 void addIRect(const SkIRect& rect); | 188 void addIRect(const SkIRect& rect); |
| 190 void addIRectPtr(const SkIRect* rect); | 189 void addIRectPtr(const SkIRect* rect); |
| 191 void addRRect(const SkRRect&); | 190 void addRRect(const SkRRect&); |
| 192 void addRegion(const SkRegion& region); | 191 void addRegion(const SkRegion& region); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 virtual void onPopCull() SK_OVERRIDE; | 247 virtual void onPopCull() SK_OVERRIDE; |
| 249 | 248 |
| 250 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS
calar y, | 249 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS
calar y, |
| 251 const SkPaint&) SK_OVERRIDE; | 250 const SkPaint&) SK_OVERRIDE; |
| 252 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin
t pos[], | 251 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin
t pos[], |
| 253 const SkPaint&) SK_OVERRIDE; | 252 const SkPaint&) SK_OVERRIDE; |
| 254 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], | 253 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], |
| 255 SkScalar constY, const SkPaint&) SK_OVERRIDE; | 254 SkScalar constY, const SkPaint&) SK_OVERRIDE; |
| 256 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, | 255 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, |
| 257 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; | 256 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; |
| 257 |
| 258 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |
| 259 const SkPoint texCoords[4], SkXfermode* xmode, |
| 260 const SkPaint& paint) SK_OVERRIDE; |
| 258 | 261 |
| 259 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 262 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
| 260 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; | 263 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; |
| 261 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 264 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; |
| 262 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; | 265 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; |
| 263 | 266 |
| 264 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*
) SK_OVERRIDE; | 267 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*
) SK_OVERRIDE; |
| 265 | 268 |
| 266 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been | 269 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been |
| 267 // tweaked by paint.computeFastBounds(). | 270 // tweaked by paint.computeFastBounds(). |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 friend class SkPictureTester; // for unit testing | 335 friend class SkPictureTester; // for unit testing |
| 333 | 336 |
| 334 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE | 337 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE |
| 335 SkMatrixClipStateMgr fMCMgr; | 338 SkMatrixClipStateMgr fMCMgr; |
| 336 #endif | 339 #endif |
| 337 | 340 |
| 338 typedef SkCanvas INHERITED; | 341 typedef SkCanvas INHERITED; |
| 339 }; | 342 }; |
| 340 | 343 |
| 341 #endif | 344 #endif |
| OLD | NEW |