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

Unified Diff: src/core/SkPictureRecord.cpp

Issue 1228083004: add src-rect-constraint to drawImageRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: propogate Constraint into SkDevice Created 5 years, 5 months 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
Index: src/core/SkPictureRecord.cpp
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 5f85b47aac27cb6558506c75e3893d8809f50cb0..3dbc4d941619387e4c5dfb7b051708a24bef5e20 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -584,9 +584,10 @@ void SkPictureRecord::onDrawImage(const SkImage* image, SkScalar x, SkScalar y,
}
void SkPictureRecord::onDrawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst,
- const SkPaint* paint) {
- // id + paint_index + image_index + bool_for_src
- size_t size = 4 * kUInt32Size;
+ const SkPaint* paint SRC_RECT_CONSTRAINT_PARAM(constraint)) {
+ SRC_RECT_CONSTRAINT_LOCAL_DEFAULT(constraint)
+ // id + paint_index + image_index + bool_for_src + constraint
+ size_t size = 5 * kUInt32Size;
if (src) {
size += sizeof(*src); // + rect
}
@@ -599,6 +600,7 @@ void SkPictureRecord::onDrawImageRect(const SkImage* image, const SkRect* src, c
this->addImage(image);
this->addRectPtr(src); // may be null
this->addRect(dst);
+ this->addInt(constraint);
this->validate(initialOffset, size);
}
« include/core/SkCanvas.h ('K') | « src/core/SkPictureRecord.h ('k') | src/core/SkRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698