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

Side by Side Diff: src/effects/SkMorphologyImageFilter.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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The Android Open Source Project 2 * Copyright 2012 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 "SkMorphologyImageFilter.h" 8 #include "SkMorphologyImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 GrMorphologyEffect::MorphologyType fType; 305 GrMorphologyEffect::MorphologyType fType;
306 GrGLUniformManager::UniformHandle fImageIncrementUni; 306 GrGLUniformManager::UniformHandle fImageIncrementUni;
307 GrGLEffectMatrix fEffectMatrix; 307 GrGLEffectMatrix fEffectMatrix;
308 308
309 typedef GrGLEffect INHERITED; 309 typedef GrGLEffect INHERITED;
310 }; 310 };
311 311
312 GrGLMorphologyEffect::GrGLMorphologyEffect(const GrBackendEffectFactory& factory , 312 GrGLMorphologyEffect::GrGLMorphologyEffect(const GrBackendEffectFactory& factory ,
313 const GrDrawEffect& drawEffect) 313 const GrDrawEffect& drawEffect)
314 : INHERITED(factory) 314 : INHERITED(factory)
315 , fImageIncrementUni(GrGLUniformManager::kInvalidUniformHandle)
316 , fEffectMatrix(drawEffect.castEffect<GrMorphologyEffect>().coordsType()) { 315 , fEffectMatrix(drawEffect.castEffect<GrMorphologyEffect>().coordsType()) {
317 const GrMorphologyEffect& m = drawEffect.castEffect<GrMorphologyEffect>(); 316 const GrMorphologyEffect& m = drawEffect.castEffect<GrMorphologyEffect>();
318 fRadius = m.radius(); 317 fRadius = m.radius();
319 fType = m.type(); 318 fType = m.type();
320 } 319 }
321 320
322 void GrGLMorphologyEffect::emitCode(GrGLShaderBuilder* builder, 321 void GrGLMorphologyEffect::emitCode(GrGLShaderBuilder* builder,
323 const GrDrawEffect&, 322 const GrDrawEffect&,
324 EffectKey key, 323 EffectKey key,
325 const char* outputColor, 324 const char* outputColor,
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 } 523 }
525 GrTexture* input = inputBM.getTexture(); 524 GrTexture* input = inputBM.getTexture();
526 SkIRect bounds; 525 SkIRect bounds;
527 src.getBounds(&bounds); 526 src.getBounds(&bounds);
528 SkAutoTUnref<GrTexture> resultTex(apply_morphology(input, bounds, 527 SkAutoTUnref<GrTexture> resultTex(apply_morphology(input, bounds,
529 GrMorphologyEffect::kErode_MorphologyType, radius())); 528 GrMorphologyEffect::kErode_MorphologyType, radius()));
530 return SkImageFilterUtils::WrapTexture(resultTex, src.width(), src.height(), result); 529 return SkImageFilterUtils::WrapTexture(resultTex, src.width(), src.height(), result);
531 } 530 }
532 531
533 #endif 532 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMatrixConvolutionImageFilter.cpp ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698