| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const Sk
Color[], int, | 183 void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const Sk
Color[], int, |
| 184 SkXfermode::Mode, const SkRect*, const SkPaint*) override; | 184 SkXfermode::Mode, const SkRect*, const SkPaint*) override; |
| 185 | 185 |
| 186 void onDrawPaint(const SkPaint&) override; | 186 void onDrawPaint(const SkPaint&) override; |
| 187 void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPain
t&) override; | 187 void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPain
t&) override; |
| 188 void onDrawRect(const SkRect&, const SkPaint&) override; | 188 void onDrawRect(const SkRect&, const SkPaint&) override; |
| 189 void onDrawOval(const SkRect&, const SkPaint&) override; | 189 void onDrawOval(const SkRect&, const SkPaint&) override; |
| 190 void onDrawRRect(const SkRRect&, const SkPaint&) override; | 190 void onDrawRRect(const SkRRect&, const SkPaint&) override; |
| 191 void onDrawPath(const SkPath&, const SkPaint&) override; | 191 void onDrawPath(const SkPath&, const SkPaint&) override; |
| 192 void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*
) override; | 192 void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*
) override; |
| 193 void onDrawImageLattice(const SkImage*, const SkCanvas::Lattice& lattice, co
nst SkRect& dst, | |
| 194 const SkPaint*) override; | |
| 195 void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, | 193 void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, |
| 196 const SkPaint*, SrcRectConstraint) override; | 194 const SkPaint*, SrcRectConstraint) override; |
| 197 void onDrawImageNine(const SkImage*, const SkIRect& center, const SkRect& ds
t, | 195 void onDrawImageNine(const SkImage*, const SkIRect& center, const SkRect& ds
t, |
| 198 const SkPaint*) override; | 196 const SkPaint*) override; |
| 197 void onDrawImageLattice(const SkImage*, const SkCanvas::Lattice& lattice, co
nst SkRect& dst, |
| 198 const SkPaint*) override; |
| 199 |
| 199 void onDrawVertices(VertexMode vmode, int vertexCount, | 200 void onDrawVertices(VertexMode vmode, int vertexCount, |
| 200 const SkPoint vertices[], const SkPoint texs[], | 201 const SkPoint vertices[], const SkPoint texs[], |
| 201 const SkColor colors[], SkXfermode* xmode, | 202 const SkColor colors[], SkXfermode* xmode, |
| 202 const uint16_t indices[], int indexCount, | 203 const uint16_t indices[], int indexCount, |
| 203 const SkPaint&) override; | 204 const SkPaint&) override; |
| 204 | 205 |
| 205 void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; | 206 void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; |
| 206 void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; | 207 void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; |
| 207 void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; | 208 void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; |
| 208 void onClipRegion(const SkRegion&, SkRegion::Op) override; | 209 void onClipRegion(const SkRegion&, SkRegion::Op) override; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 sk_throw(); | 244 sk_throw(); |
| 244 } | 245 } |
| 245 void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst,
const SkPaint*, | 246 void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst,
const SkPaint*, |
| 246 SrcRectConstraint) override { | 247 SrcRectConstraint) override { |
| 247 sk_throw(); | 248 sk_throw(); |
| 248 } | 249 } |
| 249 void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect&
dst, | 250 void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect&
dst, |
| 250 const SkPaint*) override { | 251 const SkPaint*) override { |
| 251 sk_throw(); | 252 sk_throw(); |
| 252 } | 253 } |
| 254 void onDrawBitmapLattice(const SkBitmap&, const SkCanvas::Lattice& lattice,
const SkRect& dst, |
| 255 const SkPaint*) override { |
| 256 sk_throw(); |
| 257 } |
| 253 | 258 |
| 254 private: | 259 private: |
| 255 SkPictureContentInfo fContentInfo; | 260 SkPictureContentInfo fContentInfo; |
| 256 | 261 |
| 257 SkTArray<SkPaint> fPaints; | 262 SkTArray<SkPaint> fPaints; |
| 258 | 263 |
| 259 struct PathHash { | 264 struct PathHash { |
| 260 uint32_t operator()(const SkPath& p) { return p.getGenerationID(); } | 265 uint32_t operator()(const SkPath& p) { return p.getGenerationID(); } |
| 261 }; | 266 }; |
| 262 SkTHashMap<SkPath, int, PathHash> fPaths; | 267 SkTHashMap<SkPath, int, PathHash> fPaths; |
| 263 | 268 |
| 264 SkWriter32 fWriter; | 269 SkWriter32 fWriter; |
| 265 | 270 |
| 266 // we ref each item in these arrays | 271 // we ref each item in these arrays |
| 267 SkTDArray<const SkImage*> fImageRefs; | 272 SkTDArray<const SkImage*> fImageRefs; |
| 268 SkTDArray<const SkPicture*> fPictureRefs; | 273 SkTDArray<const SkPicture*> fPictureRefs; |
| 269 SkTDArray<SkDrawable*> fDrawableRefs; | 274 SkTDArray<SkDrawable*> fDrawableRefs; |
| 270 SkTDArray<const SkTextBlob*> fTextBlobRefs; | 275 SkTDArray<const SkTextBlob*> fTextBlobRefs; |
| 271 | 276 |
| 272 uint32_t fRecordFlags; | 277 uint32_t fRecordFlags; |
| 273 int fInitialSaveCount; | 278 int fInitialSaveCount; |
| 274 | 279 |
| 275 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c
onstructor | 280 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c
onstructor |
| 276 | 281 |
| 277 typedef SkCanvas INHERITED; | 282 typedef SkCanvas INHERITED; |
| 278 }; | 283 }; |
| 279 | 284 |
| 280 #endif | 285 #endif |
| OLD | NEW |