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

Unified Diff: src/core/SkDevice.cpp

Issue 473633002: SkTextBlob (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Consolidated blob constructor + 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
Index: src/core/SkDevice.cpp
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index 50755c94ed5e65999574ec120ff3af5610344960..71887f03e813895646a080050b01208fa02f8375 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -9,6 +9,7 @@
#include "SkDraw.h"
#include "SkMetaData.h"
#include "SkPatchUtils.h"
+#include "SkTextBlob.h"
SkBaseDevice::SkBaseDevice()
: fLeakyProperties(SkDeviceProperties::MakeDefault())
@@ -92,6 +93,13 @@ void SkBaseDevice::drawPatch(const SkDraw& draw, const SkPoint cubics[12], const
paint);
}
+void SkBaseDevice::drawTextBlob(const SkDraw& draw, const SkTextBlob *blob, const SkPaint &paint) {
+ SkTextBlob::Iter iter(blob);
+ while (const SkTextChunk* chunk = iter.next()) {
+ chunk->draw(this, draw, paint);
+ }
+}
+
bool SkBaseDevice::readPixels(const SkImageInfo& info, void* dstP, size_t rowBytes, int x, int y) {
#ifdef SK_DEBUG
SkASSERT(info.width() > 0 && info.height() > 0);
« include/core/SkTextBlob.h ('K') | « src/core/SkCanvas.cpp ('k') | src/core/SkPictureFlat.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698