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

Unified Diff: tools/debugger/SkDebugCanvas.cpp

Issue 2335493005: Use sk_sp text blob APIs (Closed)
Patch Set: SK_SUPPORT_LEGACY_TEXTBLOB_BUILDER Created 4 years, 3 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 | « tests/TextBlobTest.cpp ('k') | tools/debugger/SkDrawCommand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/debugger/SkDebugCanvas.cpp
diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp
index 86125b891d746ae09842e5864b4e4e109c658d0e..4c633ab8fcb4f23b623d439092d8987af28a7f91 100644
--- a/tools/debugger/SkDebugCanvas.cpp
+++ b/tools/debugger/SkDebugCanvas.cpp
@@ -9,8 +9,9 @@
#include "SkClipStack.h"
#include "SkDebugCanvas.h"
#include "SkDrawCommand.h"
-#include "SkPaintFilterCanvas.h"
#include "SkOverdrawMode.h"
+#include "SkPaintFilterCanvas.h"
+#include "SkTextBlob.h"
#if SK_SUPPORT_GPU
#include "GrAuditTrail.h"
@@ -677,7 +678,8 @@ void SkDebugCanvas::onDrawTextRSXform(const void* text, size_t byteLength, const
void SkDebugCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
const SkPaint& paint) {
- this->addDrawCommand(new SkDrawTextBlobCommand(blob, x, y, paint));
+ this->addDrawCommand(new SkDrawTextBlobCommand(sk_ref_sp(const_cast<SkTextBlob*>(blob)),
+ x, y, paint));
}
void SkDebugCanvas::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
« no previous file with comments | « tests/TextBlobTest.cpp ('k') | tools/debugger/SkDrawCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698