| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 #include "SkBigPicture.h" | 8 #include "SkBigPicture.h" |
| 9 #include "SkCanvasPriv.h" | 9 #include "SkCanvasPriv.h" |
| 10 #include "SkPatchUtils.h" | 10 #include "SkPatchUtils.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 void SkRecorder::onDrawImageRect(const SkImage* image, const SkRect* src, const
SkRect& dst, | 233 void SkRecorder::onDrawImageRect(const SkImage* image, const SkRect* src, const
SkRect& dst, |
| 234 const SkPaint* paint, SrcRectConstraint constra
int) { | 234 const SkPaint* paint, SrcRectConstraint constra
int) { |
| 235 APPEND(DrawImageRect, this->copy(paint), image, this->copy(src), dst, constr
aint); | 235 APPEND(DrawImageRect, this->copy(paint), image, this->copy(src), dst, constr
aint); |
| 236 } | 236 } |
| 237 | 237 |
| 238 void SkRecorder::onDrawImageNine(const SkImage* image, const SkIRect& center, | 238 void SkRecorder::onDrawImageNine(const SkImage* image, const SkIRect& center, |
| 239 const SkRect& dst, const SkPaint* paint) { | 239 const SkRect& dst, const SkPaint* paint) { |
| 240 APPEND(DrawImageNine, this->copy(paint), image, center, dst); | 240 APPEND(DrawImageNine, this->copy(paint), image, center, dst); |
| 241 } | 241 } |
| 242 | 242 |
| 243 void SkRecorder::onDrawSprite(const SkBitmap& bitmap, int left, int top, const S
kPaint* paint) { |
| 244 APPEND(DrawSprite, this->copy(paint), bitmap, left, top); |
| 245 } |
| 246 |
| 243 void SkRecorder::onDrawText(const void* text, size_t byteLength, | 247 void SkRecorder::onDrawText(const void* text, size_t byteLength, |
| 244 SkScalar x, SkScalar y, const SkPaint& paint) { | 248 SkScalar x, SkScalar y, const SkPaint& paint) { |
| 245 APPEND(DrawText, | 249 APPEND(DrawText, |
| 246 paint, this->copy((const char*)text, byteLength), byteLength, x, y); | 250 paint, this->copy((const char*)text, byteLength), byteLength, x, y); |
| 247 } | 251 } |
| 248 | 252 |
| 249 void SkRecorder::onDrawPosText(const void* text, size_t byteLength, | 253 void SkRecorder::onDrawPosText(const void* text, size_t byteLength, |
| 250 const SkPoint pos[], const SkPaint& paint) { | 254 const SkPoint pos[], const SkPaint& paint) { |
| 251 const int points = paint.countText(text, byteLength); | 255 const int points = paint.countText(text, byteLength); |
| 252 APPEND(DrawPosText, | 256 APPEND(DrawPosText, |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 INHERITED(onClipPath, path, op, edgeStyle); | 375 INHERITED(onClipPath, path, op, edgeStyle); |
| 372 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); | 376 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); |
| 373 APPEND(ClipPath, this->devBounds(), path, opAA); | 377 APPEND(ClipPath, this->devBounds(), path, opAA); |
| 374 } | 378 } |
| 375 | 379 |
| 376 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { | 380 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { |
| 377 INHERITED(onClipRegion, deviceRgn, op); | 381 INHERITED(onClipRegion, deviceRgn, op); |
| 378 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); | 382 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); |
| 379 } | 383 } |
| 380 | 384 |
| OLD | NEW |