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

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

Issue 654273002: Push isEqual/onIsEqual down from GrProcessor to subclasses. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/effects/GrBezierEffect.h » ('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 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 void* GrProcessor::operator new(size_t size) { 111 void* GrProcessor::operator new(size_t size) {
112 return GrProcessor_Globals::GetTLS()->allocate(size); 112 return GrProcessor_Globals::GetTLS()->allocate(size);
113 } 113 }
114 114
115 void GrProcessor::operator delete(void* target) { 115 void GrProcessor::operator delete(void* target) {
116 GrProcessor_Globals::GetTLS()->release(target); 116 GrProcessor_Globals::GetTLS()->release(target);
117 } 117 }
118 118
119 #ifdef SK_DEBUG 119 #ifdef SK_DEBUG
120 void GrProcessor::assertEquality(const GrProcessor& other) const { 120 void GrProcessor::assertTexturesEqual(const GrProcessor& other) const {
121 SkASSERT(this->numTextures() == other.numTextures()); 121 SkASSERT(this->numTextures() == other.numTextures());
122 for (int i = 0; i < this->numTextures(); ++i) { 122 for (int i = 0; i < this->numTextures(); ++i) {
123 SkASSERT(this->textureAccess(i) == other.textureAccess(i)); 123 SkASSERT(this->textureAccess(i) == other.textureAccess(i));
124 } 124 }
125 } 125 }
126 126
127 void GrProcessor::InvariantOutput::validate() const { 127 void GrProcessor::InvariantOutput::validate() const {
128 if (fIsSingleComponent) { 128 if (fIsSingleComponent) {
129 SkASSERT(0 == fValidFlags || kRGBA_GrColorComponentFlags == fValidFlags) ; 129 SkASSERT(0 == fValidFlags || kRGBA_GrColorComponentFlags == fValidFlags) ;
130 if (kRGBA_GrColorComponentFlags == fValidFlags) { 130 if (kRGBA_GrColorComponentFlags == fValidFlags) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 return true; 165 return true;
166 } 166 }
167 #endif // end DEBUG 167 #endif // end DEBUG
168 168
169 //////////////////////////////////////////////////////////////////////////////// /////////////////// 169 //////////////////////////////////////////////////////////////////////////////// ///////////////////
170 170
171 void GrFragmentProcessor::addCoordTransform(const GrCoordTransform* transform) { 171 void GrFragmentProcessor::addCoordTransform(const GrCoordTransform* transform) {
172 fCoordTransforms.push_back(transform); 172 fCoordTransforms.push_back(transform);
173 SkDEBUGCODE(transform->setInEffect();) 173 SkDEBUGCODE(transform->setInEffect();)
174 } 174 }
OLDNEW
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/effects/GrBezierEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698