Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: src/core/SkRecorder.cpp

Issue 748063002: All the small packing tweaks mentioned in the bug. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | src/core/SkRecords.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecorder.cpp
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp
index 33d89d90794c26ca2bdfc78ad8d4c72e47651205..3252e59f62d969f9fecccc714d7887fcd0fca66a 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,
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | src/core/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698