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

Side by Side Diff: src/gpu/GrProcessor.cpp

Issue 719203002: Add GrProcOptInfo class to track various output information for color and coverage stages. (Closed) Base URL: https://skia.googlesource.com/skia.git@moveIO
Patch Set: initialize values Created 6 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/GrProcOptInfo.cpp ('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 2012 Google Inc. 2 * Copyright 2012 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 "GrProcessor.h" 8 #include "GrProcessor.h"
9 #include "GrBackendProcessorFactory.h" 9 #include "GrBackendProcessorFactory.h"
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 for (int i = 0; i < this->numTextures(); ++i) { 124 for (int i = 0; i < this->numTextures(); ++i) {
125 if (this->textureAccess(i) != that.textureAccess(i)) { 125 if (this->textureAccess(i) != that.textureAccess(i)) {
126 return false; 126 return false;
127 } 127 }
128 } 128 }
129 return true; 129 return true;
130 } 130 }
131 131
132 void GrProcessor::computeInvariantOutput(GrInvariantOutput* inout) const { 132 void GrProcessor::computeInvariantOutput(GrInvariantOutput* inout) const {
133 inout->resetWillUseInputColor();
134 this->onComputeInvariantOutput(inout); 133 this->onComputeInvariantOutput(inout);
135 #ifdef SK_DEBUG
136 inout->validate();
137 #endif
138 } 134 }
139 135
140 //////////////////////////////////////////////////////////////////////////////// /////////////////// 136 //////////////////////////////////////////////////////////////////////////////// ///////////////////
141 137
142 void GrFragmentProcessor::addCoordTransform(const GrCoordTransform* transform) { 138 void GrFragmentProcessor::addCoordTransform(const GrCoordTransform* transform) {
143 fCoordTransforms.push_back(transform); 139 fCoordTransforms.push_back(transform);
144 SkDEBUGCODE(transform->setInProcessor();) 140 SkDEBUGCODE(transform->setInProcessor();)
145 } 141 }
146 142
147 bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) con st { 143 bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) con st {
148 if (fCoordTransforms.count() != that.fCoordTransforms.count()) { 144 if (fCoordTransforms.count() != that.fCoordTransforms.count()) {
149 return false; 145 return false;
150 } 146 }
151 int count = fCoordTransforms.count(); 147 int count = fCoordTransforms.count();
152 for (int i = 0; i < count; ++i) { 148 for (int i = 0; i < count; ++i) {
153 if (*fCoordTransforms[i] != *that.fCoordTransforms[i]) { 149 if (*fCoordTransforms[i] != *that.fCoordTransforms[i]) {
154 return false; 150 return false;
155 } 151 }
156 } 152 }
157 return true; 153 return true;
158 } 154 }
OLDNEW
« no previous file with comments | « src/gpu/GrProcOptInfo.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698