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

Unified Diff: src/pipe/SkGPipeRead.cpp

Issue 1228083004: add src-rect-constraint to drawImageRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/pipe/SkGPipeRead.cpp
diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp
index 48e0c0641baa2370bd0996c5c521b6d1a41863ae..42f761788f3af88495b0909605da0604edd21453 100644
--- a/src/pipe/SkGPipeRead.cpp
+++ b/src/pipe/SkGPipeRead.cpp
@@ -689,9 +689,11 @@ static void drawImageRect_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32
src = skip<SkRect>(reader);
}
const SkRect* dst = skip<SkRect>(reader);
+ SkCanvas::SrcRectConstraint constraint = (SkCanvas::SrcRectConstraint)reader->readInt();
+
const SkImage* image = state->getImage(slot);
if (state->shouldDraw()) {
- canvas->drawImageRect(image, src, *dst, hasPaint ? &state->paint() : NULL);
+ canvas->drawImageRect(image, src, *dst, hasPaint ? &state->paint() : NULL, constraint);
}
}

Powered by Google App Engine
This is Rietveld 408576698