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

Unified Diff: src/core/SkRecordDraw.cpp

Issue 1220733006: Add support for drawBitmapRect() to SkMiniRecorder. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 6 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.cpp ('k') | src/core/SkRecorder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecordDraw.cpp
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index af71624474cd84f853b0d818a0a8e53629647669..118027b7a73f03272cc94a4134c8c4febf3bd5f2 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -94,6 +94,8 @@ DRAW(DrawBitmapRectToRect,
DRAW(DrawBitmapRectToRectBleed,
drawBitmapRectToRect(r.bitmap.shallowCopy(), r.src, r.dst, r.paint,
SkCanvas::kBleed_DrawBitmapRectFlag));
+DRAW(DrawBitmapRectToRectFixedSize,
+ drawBitmapRectToRect(r.bitmap.shallowCopy(), &r.src, r.dst, &r.paint, r.flags));
DRAW(DrawDRRect, drawDRRect(r.outer, r.inner, r.paint));
DRAW(DrawImage, drawImage(r.image, r.left, r.top, r.paint));
DRAW(DrawImageRect, drawImageRect(r.image, r.src, r.dst, r.paint));
@@ -423,6 +425,9 @@ private:
Bounds bounds(const DrawBitmapRectToRectBleed& op) const {
return this->adjustAndMap(op.dst, op.paint);
}
+ Bounds bounds(const DrawBitmapRectToRectFixedSize& op) const {
+ return this->adjustAndMap(op.dst, &op.paint);
+ }
Bounds bounds(const DrawBitmapNine& op) const {
return this->adjustAndMap(op.dst, op.paint);
}
@@ -456,7 +461,7 @@ private:
dst.set(op.vertices, op.vertexCount);
return this->adjustAndMap(dst, &op.paint);
}
-
+
Bounds bounds(const DrawAtlas& op) const {
if (op.cull) {
return this->adjustAndMap(*op.cull, op.paint);
@@ -464,7 +469,7 @@ private:
return fCurrentClipBounds;
}
}
-
+
Bounds bounds(const DrawPicture& op) const {
SkRect dst = op.picture->cullRect();
op.matrix.mapRect(&dst);
« no previous file with comments | « src/core/SkMiniRecorder.cpp ('k') | src/core/SkRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698