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

Side by Side Diff: src/effects/SkBicubicImageFilter.cpp

Issue 22340010: Refactor GrGLUniformManager::UniformHandle to initialize itself by default (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: description Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/effects/SkColorMatrixFilter.cpp » ('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 2013 The Android Open Source Project 2 * Copyright 2013 The Android Open Source Project
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 "SkBicubicImageFilter.h" 8 #include "SkBicubicImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 UniformHandle fImageIncrementUni; 208 UniformHandle fImageIncrementUni;
209 209
210 GrGLEffectMatrix fEffectMatrix; 210 GrGLEffectMatrix fEffectMatrix;
211 211
212 typedef GrGLEffect INHERITED; 212 typedef GrGLEffect INHERITED;
213 }; 213 };
214 214
215 GrGLBicubicEffect::GrGLBicubicEffect(const GrBackendEffectFactory& factory, 215 GrGLBicubicEffect::GrGLBicubicEffect(const GrBackendEffectFactory& factory,
216 const GrDrawEffect& drawEffect) 216 const GrDrawEffect& drawEffect)
217 : INHERITED(factory) 217 : INHERITED(factory)
218 , fCoefficientsUni(GrGLUniformManager::kInvalidUniformHandle)
219 , fImageIncrementUni(GrGLUniformManager::kInvalidUniformHandle)
220 , fEffectMatrix(drawEffect.castEffect<GrBicubicEffect>().coordsType()) { 218 , fEffectMatrix(drawEffect.castEffect<GrBicubicEffect>().coordsType()) {
221 } 219 }
222 220
223 void GrGLBicubicEffect::emitCode(GrGLShaderBuilder* builder, 221 void GrGLBicubicEffect::emitCode(GrGLShaderBuilder* builder,
224 const GrDrawEffect&, 222 const GrDrawEffect&,
225 EffectKey key, 223 EffectKey key,
226 const char* outputColor, 224 const char* outputColor,
227 const char* inputColor, 225 const char* inputColor,
228 const TextureSamplerArray& samplers) { 226 const TextureSamplerArray& samplers) {
229 const char* coords; 227 const char* coords;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 GrPaint paint; 366 GrPaint paint;
369 paint.addColorEffect(GrBicubicEffect::Create(srcTexture, fCoefficients))->un ref(); 367 paint.addColorEffect(GrBicubicEffect::Create(srcTexture, fCoefficients))->un ref();
370 SkRect srcRect; 368 SkRect srcRect;
371 srcBM.getBounds(&srcRect); 369 srcBM.getBounds(&srcRect);
372 context->drawRectToRect(paint, dstRect, srcRect); 370 context->drawRectToRect(paint, dstRect, srcRect);
373 return SkImageFilterUtils::WrapTexture(dst, desc.fWidth, desc.fHeight, resul t); 371 return SkImageFilterUtils::WrapTexture(dst, desc.fWidth, desc.fHeight, resul t);
374 } 372 }
375 #endif 373 #endif
376 374
377 /////////////////////////////////////////////////////////////////////////////// 375 ///////////////////////////////////////////////////////////////////////////////
OLDNEW
« no previous file with comments | « no previous file | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698