OLD | NEW |
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 "SkMatrixConvolutionImageFilter.h" | 8 #include "SkMatrixConvolutionImageFilter.h" |
9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 UniformHandle fBiasUni; | 344 UniformHandle fBiasUni; |
345 | 345 |
346 GrGLEffectMatrix fEffectMatrix; | 346 GrGLEffectMatrix fEffectMatrix; |
347 | 347 |
348 typedef GrGLEffect INHERITED; | 348 typedef GrGLEffect INHERITED; |
349 }; | 349 }; |
350 | 350 |
351 GrGLMatrixConvolutionEffect::GrGLMatrixConvolutionEffect(const GrBackendEffectFa
ctory& factory, | 351 GrGLMatrixConvolutionEffect::GrGLMatrixConvolutionEffect(const GrBackendEffectFa
ctory& factory, |
352 const GrDrawEffect& dra
wEffect) | 352 const GrDrawEffect& dra
wEffect) |
353 : INHERITED(factory) | 353 : INHERITED(factory) |
354 , fKernelUni(GrGLUniformManager::kInvalidUniformHandle) | |
355 , fImageIncrementUni(GrGLUniformManager::kInvalidUniformHandle) | |
356 , fTargetUni(GrGLUniformManager::kInvalidUniformHandle) | |
357 , fGainUni(GrGLUniformManager::kInvalidUniformHandle) | |
358 , fBiasUni(GrGLUniformManager::kInvalidUniformHandle) | |
359 , fEffectMatrix(drawEffect.castEffect<GrMatrixConvolutionEffect>().coordsTyp
e()) { | 354 , fEffectMatrix(drawEffect.castEffect<GrMatrixConvolutionEffect>().coordsTyp
e()) { |
360 const GrMatrixConvolutionEffect& m = drawEffect.castEffect<GrMatrixConvoluti
onEffect>(); | 355 const GrMatrixConvolutionEffect& m = drawEffect.castEffect<GrMatrixConvoluti
onEffect>(); |
361 fKernelSize = m.kernelSize(); | 356 fKernelSize = m.kernelSize(); |
362 fTileMode = m.tileMode(); | 357 fTileMode = m.tileMode(); |
363 fConvolveAlpha = m.convolveAlpha(); | 358 fConvolveAlpha = m.convolveAlpha(); |
364 } | 359 } |
365 | 360 |
366 static void appendTextureLookup(GrGLShaderBuilder* builder, | 361 static void appendTextureLookup(GrGLShaderBuilder* builder, |
367 const GrGLShaderBuilder::TextureSampler& sampler
, | 362 const GrGLShaderBuilder::TextureSampler& sampler
, |
368 const char* coord, | 363 const char* coord, |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 fBias, | 573 fBias, |
579 fTarget, | 574 fTarget, |
580 fTileMode, | 575 fTileMode, |
581 fConvolveAlpha); | 576 fConvolveAlpha); |
582 return true; | 577 return true; |
583 } | 578 } |
584 | 579 |
585 /////////////////////////////////////////////////////////////////////////////// | 580 /////////////////////////////////////////////////////////////////////////////// |
586 | 581 |
587 #endif | 582 #endif |
OLD | NEW |