aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-11-19 14:00:02 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-19 14:00:02 -0800
commit783a4da10ba08187a5029d74cfa1507ac1b13307 (patch)
tree1ba96fe5b9ae141af2ab9692c305447f947e5deb /src
parentb7361580f275bef90f28a62c58bac60ab64dc4cc (diff)
Add more batch information printouts
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrAtlasTextContext.cpp16
-rw-r--r--src/gpu/batches/GrAAFillRectBatch.cpp10
-rw-r--r--src/gpu/batches/GrNinePatch.cpp20
-rw-r--r--src/gpu/batches/GrNonAAFillRectBatch.cpp10
-rw-r--r--src/gpu/batches/GrTInstanceBatch.h2
-rw-r--r--src/gpu/effects/GrXfermodeFragmentProcessor.cpp9
6 files changed, 57 insertions, 10 deletions
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index 37fe092496..09190c495b 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -1335,6 +1335,22 @@ public:
const char* name() const override { return "TextBatch"; }
+ SkString dumpInfo() const override {
+ SkString str;
+
+ for (int i = 0; i < fGeoCount; ++i) {
+ str.appendf("%d: Color: 0x%08x Trans: %.2f,%.2f Runs: %d\n",
+ i,
+ fGeoData[i].fColor,
+ fGeoData[i].fTransX,
+ fGeoData[i].fTransY,
+ fGeoData[i].fBlob->fRunCount);
+ }
+
+ str.append(INHERITED::dumpInfo());
+ return str;
+ }
+
void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
if (kColorBitmapMask_MaskType == fMaskType) {
out->setUnknownFourComponents();
diff --git a/src/gpu/batches/GrAAFillRectBatch.cpp b/src/gpu/batches/GrAAFillRectBatch.cpp
index 1b3f139a02..e2b088c541 100644
--- a/src/gpu/batches/GrAAFillRectBatch.cpp
+++ b/src/gpu/batches/GrAAFillRectBatch.cpp
@@ -217,9 +217,10 @@ public:
static const char* Name() { return "AAFillRectBatchNoLocalMatrix"; }
- static SkString DumpInfo(const Geometry& geo) {
+ static SkString DumpInfo(const Geometry& geo, int index) {
SkString str;
- str.appendf("Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+ str.appendf("%d: Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+ index,
geo.fColor,
geo.fRect.fLeft, geo.fRect.fTop, geo.fRect.fRight, geo.fRect.fBottom);
return str;
@@ -266,9 +267,10 @@ public:
static const char* Name() { return "AAFillRectBatchLocalMatrix"; }
- static SkString DumpInfo(const Geometry& geo) {
+ static SkString DumpInfo(const Geometry& geo, int index) {
SkString str;
- str.appendf("Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+ str.appendf("%d: Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+ index,
geo.fColor,
geo.fRect.fLeft, geo.fRect.fTop, geo.fRect.fRight, geo.fRect.fBottom);
return str;
diff --git a/src/gpu/batches/GrNinePatch.cpp b/src/gpu/batches/GrNinePatch.cpp
index 4c6310ccd4..999e1fd156 100644
--- a/src/gpu/batches/GrNinePatch.cpp
+++ b/src/gpu/batches/GrNinePatch.cpp
@@ -54,7 +54,25 @@ public:
geo.fViewMatrix.mapRect(&fBounds, geo.fDst);
}
- const char* name() const override { return "GrNonAANinePatchBatch"; }
+ const char* name() const override { return "NonAANinePatchBatch"; }
+
+ SkString dumpInfo() const override {
+ SkString str;
+
+ for (int i = 0; i < fGeoData.count(); ++i) {
+ str.appendf("%d: Color: 0x%08x Center [L: %d, T: %d, R: %d, B: %d], "
+ "Dst [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+ i,
+ fGeoData[i].fColor,
+ fGeoData[i].fCenter.fLeft, fGeoData[i].fCenter.fTop,
+ fGeoData[i].fCenter.fRight, fGeoData[i].fCenter.fBottom,
+ fGeoData[i].fDst.fLeft, fGeoData[i].fDst.fTop,
+ fGeoData[i].fDst.fRight, fGeoData[i].fDst.fBottom);
+ }
+
+ str.append(INHERITED::dumpInfo());
+ return str;
+ }
void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
out->setUnknownFourComponents();
diff --git a/src/gpu/batches/GrNonAAFillRectBatch.cpp b/src/gpu/batches/GrNonAAFillRectBatch.cpp
index 3ad869bc9a..5f37741b46 100644
--- a/src/gpu/batches/GrNonAAFillRectBatch.cpp
+++ b/src/gpu/batches/GrNonAAFillRectBatch.cpp
@@ -124,9 +124,10 @@ public:
static const char* Name() { return "NonAAFillRectBatch"; }
- static SkString DumpInfo(const Geometry& geo) {
+ static SkString DumpInfo(const Geometry& geo, int index) {
SkString str;
- str.appendf("Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+ str.appendf("%d: Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+ index,
geo.fColor,
geo.fRect.fLeft, geo.fRect.fTop, geo.fRect.fRight, geo.fRect.fBottom);
return str;
@@ -168,9 +169,10 @@ public:
static const char* Name() { return "NonAAFillRectBatchPerspective"; }
- static SkString DumpInfo(const Geometry& geo) {
+ static SkString DumpInfo(const Geometry& geo, int index) {
SkString str;
- str.appendf("Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+ str.appendf("%d: Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+ index,
geo.fColor,
geo.fRect.fLeft, geo.fRect.fTop, geo.fRect.fRight, geo.fRect.fBottom);
return str;
diff --git a/src/gpu/batches/GrTInstanceBatch.h b/src/gpu/batches/GrTInstanceBatch.h
index 86d85b616f..5dc5988e58 100644
--- a/src/gpu/batches/GrTInstanceBatch.h
+++ b/src/gpu/batches/GrTInstanceBatch.h
@@ -53,7 +53,7 @@ public:
SkString dumpInfo() const override {
SkString str;
for (int i = 0; i < fGeoData.count(); ++i) {
- str.append(Impl::DumpInfo(fGeoData[i]));
+ str.append(Impl::DumpInfo(fGeoData[i], i));
}
str.append(INHERITED::dumpInfo());
return str;
diff --git a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
index 3706c994b8..6ff4d32f06 100644
--- a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
+++ b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
@@ -154,6 +154,15 @@ public:
const char* name() const override { return "ComposeOne"; }
+ SkString dumpInfo() const override {
+ SkString str;
+
+ for (int i = 0; i < this->numChildProcessors(); ++i) {
+ str.append(this->childProcessor(i).dumpInfo());
+ }
+ return str;
+ }
+
void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
GR_STATIC_ASSERT((SkXfermode::kLastMode & SK_MaxU16) == SkXfermode::kLastMode);
b->add32(fMode | (fChild << 16));