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

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

Issue 1308513004: fUsesLocalCoords is updated in the parent when a child proc is registered. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 4 months 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 | « no previous file | 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 "GrContext.h" 9 #include "GrContext.h"
10 #include "GrCoordTransform.h" 10 #include "GrCoordTransform.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 child->fTextureAccesses.begin()); 198 child->fTextureAccesses.begin());
199 } 199 }
200 200
201 int index = fChildProcessors.count(); 201 int index = fChildProcessors.count();
202 fChildProcessors.push_back(GrFragmentStage(child)); 202 fChildProcessors.push_back(GrFragmentStage(child));
203 203
204 if (child->willReadFragmentPosition()) { 204 if (child->willReadFragmentPosition()) {
205 this->setWillReadFragmentPosition(); 205 this->setWillReadFragmentPosition();
206 } 206 }
207 207
208 if (child->usesLocalCoords()) {
209 fUsesLocalCoords = true;
210 }
211
208 return index; 212 return index;
209 } 213 }
210 214
211 bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) con st { 215 bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) con st {
212 if (this->numTransforms() != that.numTransforms()) { 216 if (this->numTransforms() != that.numTransforms()) {
213 return false; 217 return false;
214 } 218 }
215 int count = this->numTransforms(); 219 int count = this->numTransforms();
216 for (int i = 0; i < count; ++i) { 220 for (int i = 0; i < count; ++i) {
217 if (this->coordTransform(i) != that.coordTransform(i)) { 221 if (this->coordTransform(i) != that.coordTransform(i)) {
(...skipping 16 matching lines...) Expand all
234 //////////////////////////////////////////////////////////////////////////////// /////////////////// 238 //////////////////////////////////////////////////////////////////////////////// ///////////////////
235 239
236 // GrProcessorDataManager lives in the same pool 240 // GrProcessorDataManager lives in the same pool
237 void* GrProcessorDataManager::operator new(size_t size) { 241 void* GrProcessorDataManager::operator new(size_t size) {
238 return MemoryPoolAccessor().pool()->allocate(size); 242 return MemoryPoolAccessor().pool()->allocate(size);
239 } 243 }
240 244
241 void GrProcessorDataManager::operator delete(void* target) { 245 void GrProcessorDataManager::operator delete(void* target) {
242 return MemoryPoolAccessor().pool()->release(target); 246 return MemoryPoolAccessor().pool()->release(target);
243 } 247 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698