diff options
author | 2014-11-21 08:48:35 -0800 | |
---|---|---|
committer | 2014-11-21 08:48:35 -0800 | |
commit | 42ddcd49060f64be57f00e651650154f9b4f3a08 (patch) | |
tree | f42044381cc8a017fe3d89f0d0aa3b3f84f2bbd2 /src/core/SkRecorder.cpp | |
parent | 4af267b11964d4a8acdb232ac46094c84d890e88 (diff) |
All the small packing tweaks mentioned in the bug.
BUG=skia:3144
Review URL: https://codereview.chromium.org/748063002
Diffstat (limited to 'src/core/SkRecorder.cpp')
-rw-r--r-- | src/core/SkRecorder.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp index 33d89d9079..3252e59f62 100644 --- a/src/core/SkRecorder.cpp +++ b/src/core/SkRecorder.cpp @@ -152,7 +152,7 @@ void SkRecorder::drawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint& paint) { - APPEND(DrawPoints, delay_copy(paint), mode, count, this->copy(pts, count)); + APPEND(DrawPoints, delay_copy(paint), mode, SkToUInt(count), this->copy(pts, count)); } void SkRecorder::drawRect(const SkRect& rect, const SkPaint& paint) { @@ -192,8 +192,14 @@ void SkRecorder::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect& dst, const SkPaint* paint, DrawBitmapRectFlags flags) { + if (kBleed_DrawBitmapRectFlag == flags) { + APPEND(DrawBitmapRectToRectBleed, + this->copy(paint), delay_copy(bitmap), this->copy(src), dst); + return; + } + SkASSERT(kNone_DrawBitmapRectFlag == flags); APPEND(DrawBitmapRectToRect, - this->copy(paint), delay_copy(bitmap), this->copy(src), dst, flags); + this->copy(paint), delay_copy(bitmap), this->copy(src), dst); } void SkRecorder::drawBitmapMatrix(const SkBitmap& bitmap, @@ -246,9 +252,9 @@ void SkRecorder::onDrawPosTextH(const void* text, size_t byteLength, APPEND(DrawPosTextH, delay_copy(paint), this->copy((const char*)text, byteLength), - byteLength, - this->copy(xpos, points), - constY); + SkToUInt(byteLength), + constY, + this->copy(xpos, points)); } void SkRecorder::onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path, |