Index: src/core/SkRecordDraw.cpp |
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp |
index 65e6d490db6e670e0514c789b24b7763608d9706..de31908944723ff3781d2fecf80a85c2bcaeae23 100644 |
--- a/src/core/SkRecordDraw.cpp |
+++ b/src/core/SkRecordDraw.cpp |
@@ -115,6 +115,7 @@ DRAW(DrawSprite, drawSprite(r.bitmap.shallowCopy(), r.left, r.top, 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(DrawAtlas, drawAtlas(r.atlas, r.xforms, r.texs, r.colors, r.count, r.cull, r.paint)); |
DRAW(DrawVertices, drawVertices(r.vmode, r.vertexCount, r.vertices, r.texs, r.colors, |
r.xmode.get(), r.indices, r.indexCount, r.paint)); |
#undef DRAW |
@@ -458,7 +459,15 @@ 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); |
+ } else { |
+ return fCurrentClipBounds; |
mtklein
2015/06/15 20:45:40
Add // We could brute force the bounds here. ?
reed1
2015/06/15 20:59:18
Agreed. Will write that. (not as cheap as just bou
|
+ } |
+ } |
+ |
Bounds bounds(const DrawPicture& op) const { |
SkRect dst = op.picture->cullRect(); |
op.matrix.mapRect(&dst); |