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

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

Issue 1266633003: Added registerChild; transforms, textures, glKey automatically handled. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: refactored to onGetGLProcessorKey; removed emitSamplers specialized template; fixed nits 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 | « src/gpu/effects/GrBicubicEffect.h ('k') | src/gpu/effects/GrConfigConversionEffect.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 2014 Google Inc. 2 * Copyright 2014 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 "GrBicubicEffect.h" 8 #include "GrBicubicEffect.h"
9 #include "GrInvariantOutput.h" 9 #include "GrInvariantOutput.h"
10 #include "gl/builders/GrGLProgramBuilder.h" 10 #include "gl/builders/GrGLProgramBuilder.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 : INHERITED(procDataManager, texture, matrix, 145 : INHERITED(procDataManager, texture, matrix,
146 GrTextureParams(SkShader::kClamp_TileMode, GrTextureParams::kNone_ FilterMode)) 146 GrTextureParams(SkShader::kClamp_TileMode, GrTextureParams::kNone_ FilterMode))
147 , fDomain(domain, GrTextureDomain::kClamp_Mode) { 147 , fDomain(domain, GrTextureDomain::kClamp_Mode) {
148 this->initClassID<GrBicubicEffect>(); 148 this->initClassID<GrBicubicEffect>();
149 convert_row_major_scalar_coeffs_to_column_major_floats(fCoefficients, coeffi cients); 149 convert_row_major_scalar_coeffs_to_column_major_floats(fCoefficients, coeffi cients);
150 } 150 }
151 151
152 GrBicubicEffect::~GrBicubicEffect() { 152 GrBicubicEffect::~GrBicubicEffect() {
153 } 153 }
154 154
155 void GrBicubicEffect::getGLProcessorKey(const GrGLSLCaps& caps, 155 void GrBicubicEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
156 GrProcessorKeyBuilder* b) const { 156 GrProcessorKeyBuilder* b) const {
157 GrGLBicubicEffect::GenKey(*this, caps, b); 157 GrGLBicubicEffect::GenKey(*this, caps, b);
158 } 158 }
159 159
160 GrGLFragmentProcessor* GrBicubicEffect::createGLInstance() const { 160 GrGLFragmentProcessor* GrBicubicEffect::createGLInstance() const {
161 return SkNEW_ARGS(GrGLBicubicEffect, (*this)); 161 return SkNEW_ARGS(GrGLBicubicEffect, (*this));
162 } 162 }
163 163
164 bool GrBicubicEffect::onIsEqual(const GrFragmentProcessor& sBase) const { 164 bool GrBicubicEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
165 const GrBicubicEffect& s = sBase.cast<GrBicubicEffect>(); 165 const GrBicubicEffect& s = sBase.cast<GrBicubicEffect>();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // Use bilerp to handle rotation or fractional translation. 209 // Use bilerp to handle rotation or fractional translation.
210 *filterMode = GrTextureParams::kBilerp_FilterMode; 210 *filterMode = GrTextureParams::kBilerp_FilterMode;
211 } 211 }
212 return false; 212 return false;
213 } 213 }
214 // When we use the bicubic filtering effect each sample is read from the tex ture using 214 // When we use the bicubic filtering effect each sample is read from the tex ture using
215 // nearest neighbor sampling. 215 // nearest neighbor sampling.
216 *filterMode = GrTextureParams::kNone_FilterMode; 216 *filterMode = GrTextureParams::kNone_FilterMode;
217 return true; 217 return true;
218 } 218 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBicubicEffect.h ('k') | src/gpu/effects/GrConfigConversionEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698