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

Unified Diff: src/core/SkRecordDraw.cpp

Issue 1992283002: Add drawBitmapLattice() API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add implementation for SkRecorder and SkPictureRecord Created 4 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/SkRecordDraw.cpp
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index ec9aee9562beee1f815e9bbddcf995cfa33bfd2c..a7ece7085130eb7abd8a7e8dd44a67ab1c16ba70 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+#include "SkCanvasPriv.h"
#include "SkLayerInfo.h"
#include "SkRecordDraw.h"
#include "SkPatchUtils.h"
@@ -89,6 +90,9 @@ DRAW(ClipRegion, clipRegion(r.region, r.op));
DRAW(DrawBitmap, drawBitmap(r.bitmap.shallowCopy(), r.left, r.top, r.paint));
DRAW(DrawBitmapNine, drawBitmapNine(r.bitmap.shallowCopy(), r.center, r.dst, r.paint));
+DRAW(DrawBitmapNineDivs,
+ drawBitmapNine(r.bitmap.shallowCopy(), SkNinePatchDivs::FromData(r.divs.get()), r.dst,
+ r.paint));
DRAW(DrawBitmapRect,
legacy_drawBitmapRect(r.bitmap.shallowCopy(), r.src, r.dst, r.paint,
SkCanvas::kStrict_SrcRectConstraint));
@@ -422,6 +426,9 @@ private:
Bounds bounds(const DrawBitmapNine& op) const {
return this->adjustAndMap(op.dst, op.paint);
}
+ Bounds bounds(const DrawBitmapNineDivs& op) const {
+ return this->adjustAndMap(op.dst, op.paint);
+ }
Bounds bounds(const DrawBitmap& op) const {
return this->adjustAndMap(
SkRect::MakeXYWH(op.left, op.top, op.bitmap.width(), op.bitmap.height()),

Powered by Google App Engine
This is Rietveld 408576698