Index: src/core/SkBBoxRecord.cpp |
diff --git a/src/core/SkBBoxRecord.cpp b/src/core/SkBBoxRecord.cpp |
index 69139ad54de9ad0d2e159705340eed60c407d201..5837a88f5a5eb7a35acf651f8dd52dfd4cc2fdb3 100644 |
--- a/src/core/SkBBoxRecord.cpp |
+++ b/src/core/SkBBoxRecord.cpp |
@@ -9,6 +9,8 @@ |
#include "SkBBoxRecord.h" |
#include "SkPatchUtils.h" |
+#include "SkTextBlob.h" |
+ |
SkBBoxRecord::~SkBBoxRecord() { |
fSaveStack.deleteAll(); |
} |
@@ -272,6 +274,20 @@ void SkBBoxRecord::onDrawTextOnPath(const void* text, size_t byteLength, const S |
} |
} |
+void SkBBoxRecord::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, |
+ const SkPaint& paint) { |
+ SkRect bbox = blob->bounds(); |
+ bbox.offset(x, y); |
+ // FIXME: implement implicit blob bounds! |
+ if (bbox.isEmpty()) { |
+ this->getClipBounds(&bbox); |
+ } |
+ |
+ if (this->transformBounds(bbox, &paint)) { |
+ INHERITED::onDrawTextBlob(blob, x, y, paint); |
+ } |
+} |
+ |
void SkBBoxRecord::drawVertices(VertexMode mode, int vertexCount, |
const SkPoint vertices[], const SkPoint texs[], |
const SkColor colors[], SkXfermode* xfer, |