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

Side by Side Diff: src/gpu/batches/GrDrawBatch.h

Issue 1443763002: Increase the amount of debug information printed out by batches (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix printf Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « src/gpu/batches/GrDiscardBatch.h ('k') | src/gpu/batches/GrNonAAFillRectBatch.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrDrawBatch_DEFINED 8 #ifndef GrDrawBatch_DEFINED
9 #define GrDrawBatch_DEFINED 9 #define GrDrawBatch_DEFINED
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // TODO no GrPrimitiveProcessors yet read fragment position 56 // TODO no GrPrimitiveProcessors yet read fragment position
57 bool willReadFragmentPosition() const { return false; } 57 bool willReadFragmentPosition() const { return false; }
58 58
59 uint32_t renderTargetUniqueID() const final { 59 uint32_t renderTargetUniqueID() const final {
60 SkASSERT(fPipelineInstalled); 60 SkASSERT(fPipelineInstalled);
61 return this->pipeline()->getRenderTarget()->getUniqueID(); 61 return this->pipeline()->getRenderTarget()->getUniqueID();
62 } 62 }
63 63
64 SkString dumpInfo() const override { 64 SkString dumpInfo() const override {
65 SkString string; 65 SkString string;
66 string.appendf("RT: %d\n", this->renderTargetUniqueID());
66 string.append("ColorStages:\n"); 67 string.append("ColorStages:\n");
67 for (int i = 0; i < this->pipeline()->numColorFragmentProcessors(); i++) { 68 for (int i = 0; i < this->pipeline()->numColorFragmentProcessors(); i++) {
68 string.appendf("\t\t%s\n", this->pipeline()->getColorFragmentProcess or(i).name()); 69 string.appendf("\t\t%s\n\t\t%s\n",
70 this->pipeline()->getColorFragmentProcessor(i).name() ,
71 this->pipeline()->getColorFragmentProcessor(i).dumpIn fo().c_str());
69 } 72 }
70 string.append("CoverageStages:\n"); 73 string.append("CoverageStages:\n");
71 for (int i = 0; i < this->pipeline()->numCoverageFragmentProcessors(); i ++) { 74 for (int i = 0; i < this->pipeline()->numCoverageFragmentProcessors(); i ++) {
72 string.appendf("\t%s\n", this->pipeline()->getCoverageFragmentProces sor(i).name()); 75 string.appendf("\t\t%s\n\t\t%s\n",
76 this->pipeline()->getCoverageFragmentProcessor(i).nam e(),
77 this->pipeline()->getCoverageFragmentProcessor(i).dum pInfo().c_str());
73 } 78 }
74 string.appendf("XP: %s\n", this->pipeline()->getXferProcessor()->name()) ; 79 string.appendf("XP: %s\n", this->pipeline()->getXferProcessor()->name()) ;
75 return string; 80 return string;
76 } 81 }
77 82
78 private: 83 private:
79 /** 84 /**
80 * initBatchTracker is a hook for the some additional overrides / optimizati on possibilities 85 * initBatchTracker is a hook for the some additional overrides / optimizati on possibilities
81 * from the GrXferProcessor. 86 * from the GrXferProcessor.
82 */ 87 */
83 virtual void initBatchTracker(const GrPipelineOptimizations&) = 0; 88 virtual void initBatchTracker(const GrPipelineOptimizations&) = 0;
84 89
85 protected: 90 protected:
86 SkTArray<SkAutoTUnref<GrBatchUploader>, true> fInlineUploads; 91 SkTArray<SkAutoTUnref<GrBatchUploader>, true> fInlineUploads;
87 92
88 private: 93 private:
89 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage; 94 SkAlignedSTStorage<1, GrPipeline> fPipelineStorage;
90 bool fPipelineInstalled; 95 bool fPipelineInstalled;
91 typedef GrBatch INHERITED; 96 typedef GrBatch INHERITED;
92 }; 97 };
93 98
94 #endif 99 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDiscardBatch.h ('k') | src/gpu/batches/GrNonAAFillRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698