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

Unified Diff: src/core/SkMiniRecorder.cpp

Issue 1228083004: add src-rect-constraint to drawImageRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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
« no previous file with comments | « src/core/SkMiniRecorder.h ('k') | src/core/SkPictureFlat.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMiniRecorder.cpp
diff --git a/src/core/SkMiniRecorder.cpp b/src/core/SkMiniRecorder.cpp
index 538db087bf244294c301bde6047d84045bee60f8..916c47730b02510820bb618a1c66b02c7136f126 100644
--- a/src/core/SkMiniRecorder.cpp
+++ b/src/core/SkMiniRecorder.cpp
@@ -72,8 +72,8 @@ SkMiniRecorder::~SkMiniRecorder() {
new (fBuffer.get()) Type(__VA_ARGS__); \
return true
-bool SkMiniRecorder::drawBitmapRectToRect(const SkBitmap& bm, const SkRect* src, const SkRect& dst,
- const SkPaint* p, SkCanvas::DrawBitmapRectFlags flags) {
+bool SkMiniRecorder::drawBitmapRect(const SkBitmap& bm, const SkRect* src, const SkRect& dst,
+ const SkPaint* p, SkCanvas::SrcRectConstraint constraint) {
SkRect bounds;
if (!src) {
bm.getBounds(&bounds);
@@ -83,7 +83,7 @@ bool SkMiniRecorder::drawBitmapRectToRect(const SkBitmap& bm, const SkRect* src,
if (!p) {
p = defaultPaint.init();
}
- TRY_TO_STORE(DrawBitmapRectToRectFixedSize, *p, bm, *src, dst, flags);
+ TRY_TO_STORE(DrawBitmapRectFixedSize, *p, bm, *src, dst, constraint);
}
bool SkMiniRecorder::drawRect(const SkRect& rect, const SkPaint& paint) {
@@ -108,7 +108,7 @@ SkPicture* SkMiniRecorder::detachAsPicture(const SkRect& cull) {
switch (fState) {
case State::kEmpty: return SkRef(gEmptyPicture.get());
- CASE(DrawBitmapRectToRectFixedSize);
+ CASE(DrawBitmapRectFixedSize);
CASE(DrawPath);
CASE(DrawRect);
CASE(DrawTextBlob);
@@ -129,7 +129,7 @@ void SkMiniRecorder::flushAndReset(SkCanvas* canvas) {
switch (fState) {
case State::kEmpty: return;
- CASE(DrawBitmapRectToRectFixedSize);
+ CASE(DrawBitmapRectFixedSize);
CASE(DrawPath);
CASE(DrawRect);
CASE(DrawTextBlob);
« no previous file with comments | « src/core/SkMiniRecorder.h ('k') | src/core/SkPictureFlat.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698