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

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

Issue 1443743002: Rename some processor functions from GL to GLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@primProcs
Patch Set: nits 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/effects/GrBicubicEffect.h ('k') | src/gpu/effects/GrBitmapTextGeoProc.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 "glsl/GrGLSLFragmentShaderBuilder.h" 10 #include "glsl/GrGLSLFragmentShaderBuilder.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 : INHERITED(texture, matrix, 145 : INHERITED(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::onGetGLProcessorKey(const GrGLSLCaps& caps, 155 void GrBicubicEffect::onGetGLSLProcessorKey(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 GrGLSLFragmentProcessor* GrBicubicEffect::onCreateGLInstance() const { 160 GrGLSLFragmentProcessor* GrBicubicEffect::onCreateGLSLInstance() const {
161 return new GrGLBicubicEffect(*this); 161 return new 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>();
166 return !memcmp(fCoefficients, s.coefficients(), 16) && 166 return !memcmp(fCoefficients, s.coefficients(), 16) &&
167 fDomain == s.fDomain; 167 fDomain == s.fDomain;
168 } 168 }
169 169
170 void GrBicubicEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const { 170 void GrBicubicEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
(...skipping 38 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/GrBitmapTextGeoProc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698