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

Unified Diff: src/core/SkBBoxRecord.cpp

Issue 499413002: SkTextBlob plumbing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: review comments Created 6 years, 4 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/SkBBoxRecord.h ('k') | src/core/SkPictureData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « src/core/SkBBoxRecord.h ('k') | src/core/SkPictureData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698