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

Side by Side Diff: src/effects/SkMagnifierImageFilter.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 | « src/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.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 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkMagnifierImageFilter.h" 9 #include "SkMagnifierImageFilter.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 UniformHandle fInsetVar; 111 UniformHandle fInsetVar;
112 112
113 GrGLEffectMatrix fEffectMatrix; 113 GrGLEffectMatrix fEffectMatrix;
114 114
115 typedef GrGLEffect INHERITED; 115 typedef GrGLEffect INHERITED;
116 }; 116 };
117 117
118 GrGLMagnifierEffect::GrGLMagnifierEffect(const GrBackendEffectFactory& factory, 118 GrGLMagnifierEffect::GrGLMagnifierEffect(const GrBackendEffectFactory& factory,
119 const GrDrawEffect& drawEffect) 119 const GrDrawEffect& drawEffect)
120 : INHERITED(factory) 120 : INHERITED(factory)
121 , fOffsetVar(GrGLUniformManager::kInvalidUniformHandle)
122 , fZoomVar(GrGLUniformManager::kInvalidUniformHandle)
123 , fInsetVar(GrGLUniformManager::kInvalidUniformHandle)
124 , fEffectMatrix(drawEffect.castEffect<GrMagnifierEffect>().coordsType()) { 121 , fEffectMatrix(drawEffect.castEffect<GrMagnifierEffect>().coordsType()) {
125 } 122 }
126 123
127 void GrGLMagnifierEffect::emitCode(GrGLShaderBuilder* builder, 124 void GrGLMagnifierEffect::emitCode(GrGLShaderBuilder* builder,
128 const GrDrawEffect&, 125 const GrDrawEffect&,
129 EffectKey key, 126 EffectKey key,
130 const char* outputColor, 127 const char* outputColor,
131 const char* inputColor, 128 const char* inputColor,
132 const TextureSamplerArray& samplers) { 129 const TextureSamplerArray& samplers) {
133 const char* coords; 130 const char* coords;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 342
346 int x_val = SkMin32(SkScalarFloorToInt(x_interp), width - 1); 343 int x_val = SkMin32(SkScalarFloorToInt(x_interp), width - 1);
347 int y_val = SkMin32(SkScalarFloorToInt(y_interp), height - 1); 344 int y_val = SkMin32(SkScalarFloorToInt(y_interp), height - 1);
348 345
349 *dptr = sptr[y_val * width + x_val]; 346 *dptr = sptr[y_val * width + x_val];
350 dptr++; 347 dptr++;
351 } 348 }
352 } 349 }
353 return true; 350 return true;
354 } 351 }
OLDNEW
« no previous file with comments | « src/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698