aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrProcessor.h8
-rw-r--r--include/gpu/effects/GrConstColorProcessor.h6
2 files changed, 14 insertions, 0 deletions
diff --git a/include/gpu/GrProcessor.h b/include/gpu/GrProcessor.h
index 7c24f549f0..9b5db5e033 100644
--- a/include/gpu/GrProcessor.h
+++ b/include/gpu/GrProcessor.h
@@ -13,6 +13,7 @@
#include "GrProgramElement.h"
#include "GrTextureAccess.h"
#include "SkMath.h"
+#include "SkString.h"
class GrContext;
class GrCoordTransform;
@@ -62,6 +63,13 @@ public:
in generated shader code. */
virtual const char* name() const = 0;
+ // Human-readable dump of all information
+ virtual SkString dumpInfo() const {
+ SkString str;
+ str.appendf("Missing data");
+ return str;
+ }
+
int numTextures() const { return fTextureAccesses.count(); }
/** Returns the access pattern for the texture at index. index must be valid according to
diff --git a/include/gpu/effects/GrConstColorProcessor.h b/include/gpu/effects/GrConstColorProcessor.h
index c9686b6499..679533eac5 100644
--- a/include/gpu/effects/GrConstColorProcessor.h
+++ b/include/gpu/effects/GrConstColorProcessor.h
@@ -32,6 +32,12 @@ public:
const char* name() const override { return "Color"; }
+ SkString dumpInfo() const override {
+ SkString str;
+ str.appendf("Color: 0x%08x", fColor);
+ return str;
+ }
+
GrColor color() const { return fColor; }
InputMode inputMode() const { return fMode; }