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

Unified Diff: src/utils/debugger/SkObjectParser.cpp

Issue 1311523003: Update debugger print out of drawImageRect information (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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/utils/debugger/SkObjectParser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/debugger/SkObjectParser.cpp
diff --git a/src/utils/debugger/SkObjectParser.cpp b/src/utils/debugger/SkObjectParser.cpp
index d8dbe838da043f6c8015479242d48ce6e3d01857..3807fad59b5172b908b267044dce62411a06d9c1 100644
--- a/src/utils/debugger/SkObjectParser.cpp
+++ b/src/utils/debugger/SkObjectParser.cpp
@@ -9,6 +9,7 @@
#include "SkObjectParser.h"
#include "SkData.h"
#include "SkFontDescriptor.h"
+#include "SkImage.h"
#include "SkPath.h"
#include "SkRRect.h"
#include "SkShader.h"
@@ -58,6 +59,29 @@ SkString* SkObjectParser::BitmapToString(const SkBitmap& bitmap) {
return mBitmap;
}
+SkString* SkObjectParser::ImageToString(const SkImage* image) {
+ SkString* str = new SkString("SkImage: ");
+ if (!image) {
+ return str;
+ }
+
+ str->append("W: ");
+ str->appendS32(image->width());
+ str->append(" H: ");
+ str->appendS32(image->height());
+
+ if (image->isOpaque()) {
+ str->append(" opaque");
+ } else {
+ str->append(" not-opaque");
+ }
+
+ str->append(" uniqueID: ");
+ str->appendS32(image->uniqueID());
+
+ return str;
+}
+
SkString* SkObjectParser::BoolToString(bool doAA) {
SkString* mBool = new SkString("Bool doAA: ");
if (doAA) {
« no previous file with comments | « src/utils/debugger/SkObjectParser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698