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

Side by Side Diff: src/gpu/effects/GrXfermodeFragmentProcessor.cpp

Issue 1457373003: Add more batch information printouts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/GrTInstanceBatch.h ('k') | no next file » | 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 #include "effects/GrXfermodeFragmentProcessor.h" 8 #include "effects/GrXfermodeFragmentProcessor.h"
9 9
10 #include "GrFragmentProcessor.h" 10 #include "GrFragmentProcessor.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 ComposeOneFragmentProcessor(const GrFragmentProcessor* dst, SkXfermode::Mode mode, Child child) 147 ComposeOneFragmentProcessor(const GrFragmentProcessor* dst, SkXfermode::Mode mode, Child child)
148 : fMode(mode) 148 : fMode(mode)
149 , fChild(child) { 149 , fChild(child) {
150 this->initClassID<ComposeOneFragmentProcessor>(); 150 this->initClassID<ComposeOneFragmentProcessor>();
151 SkDEBUGCODE(int dstIndex = )this->registerChildProcessor(dst); 151 SkDEBUGCODE(int dstIndex = )this->registerChildProcessor(dst);
152 SkASSERT(0 == dstIndex); 152 SkASSERT(0 == dstIndex);
153 } 153 }
154 154
155 const char* name() const override { return "ComposeOne"; } 155 const char* name() const override { return "ComposeOne"; }
156 156
157 SkString dumpInfo() const override {
158 SkString str;
159
160 for (int i = 0; i < this->numChildProcessors(); ++i) {
161 str.append(this->childProcessor(i).dumpInfo());
162 }
163 return str;
164 }
165
157 void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override { 166 void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
158 GR_STATIC_ASSERT((SkXfermode::kLastMode & SK_MaxU16) == SkXfermode::kLas tMode); 167 GR_STATIC_ASSERT((SkXfermode::kLastMode & SK_MaxU16) == SkXfermode::kLas tMode);
159 b->add32(fMode | (fChild << 16)); 168 b->add32(fMode | (fChild << 16));
160 } 169 }
161 170
162 SkXfermode::Mode mode() const { return fMode; } 171 SkXfermode::Mode mode() const { return fMode; }
163 172
164 Child child() const { return fChild; } 173 Child child() const { return fChild; }
165 174
166 protected: 175 protected:
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 case SkXfermode::kClear_Mode: 303 case SkXfermode::kClear_Mode:
295 return GrConstColorProcessor::Create(GrColor_TRANSPARENT_BLACK, 304 return GrConstColorProcessor::Create(GrColor_TRANSPARENT_BLACK,
296 GrConstColorProcessor::kIgnore_ InputMode); 305 GrConstColorProcessor::kIgnore_ InputMode);
297 case SkXfermode::kDst_Mode: 306 case SkXfermode::kDst_Mode:
298 return nullptr; 307 return nullptr;
299 default: 308 default:
300 return new ComposeOneFragmentProcessor(src, mode, 309 return new ComposeOneFragmentProcessor(src, mode,
301 ComposeOneFragmentProcessor:: kSrc_Child); 310 ComposeOneFragmentProcessor:: kSrc_Child);
302 } 311 }
303 } 312 }
OLDNEW
« no previous file with comments | « src/gpu/batches/GrTInstanceBatch.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698