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

Unified Diff: src/core/SkRecordDraw.cpp

Issue 2130643004: drawTextRSXform (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update util canvases 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 d0e8c4cf48b8354e56e4f0f0c92a214d96c11821..ec9aee9562beee1f815e9bbddcf995cfa33bfd2c 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -114,6 +114,7 @@ DRAW(DrawRect, drawRect(r.rect, r.paint));
DRAW(DrawText, drawText(r.text, r.byteLength, r.x, r.y, r.paint));
DRAW(DrawTextBlob, drawTextBlob(r.blob, r.x, r.y, r.paint));
DRAW(DrawTextOnPath, drawTextOnPath(r.text, r.byteLength, r.path, &r.matrix, r.paint));
+DRAW(DrawTextRSXform, drawTextRSXform(r.text, r.byteLength, r.xforms, r.cull, r.paint));
DRAW(DrawAtlas, drawAtlas(r.atlas, r.xforms, r.texs, r.colors, r.count, r.mode, r.cull, r.paint));
DRAW(DrawVertices, drawVertices(r.vmode, r.vertexCount, r.vertices, r.texs, r.colors,
r.xmode, r.indices, r.indexCount, r.paint));
@@ -454,6 +455,8 @@ private:
Bounds bounds(const DrawAtlas& op) const {
if (op.cull) {
+ // TODO: <reed> can we pass nullptr for the paint? Isn't cull already "correct"
+ // for the paint (by the caller)?
return this->adjustAndMap(*op.cull, op.paint);
} else {
return fCurrentClipBounds;
@@ -508,6 +511,14 @@ private:
return this->adjustAndMap(dst, &op.paint);
}
+ Bounds bounds(const DrawTextRSXform& op) const {
+ if (op.cull) {
+ return this->adjustAndMap(*op.cull, nullptr);
+ } else {
+ return fCurrentClipBounds;
+ }
+ }
+
Bounds bounds(const DrawTextBlob& op) const {
SkRect dst = op.blob->bounds();
dst.offset(op.x, op.y);

Powered by Google App Engine
This is Rietveld 408576698