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

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

Issue 522873005: Move MakeDivByTextureWHMatrix to GrCoordTransform (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « src/gpu/effects/Gr1DKernelEffect.h ('k') | src/gpu/effects/GrMatrixConvolutionEffect.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 Google Inc. 2 * Copyright 2013 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 #ifndef GrBicubicTextureEffect_DEFINED 8 #ifndef GrBicubicTextureEffect_DEFINED
9 #define GrBicubicTextureEffect_DEFINED 9 #define GrBicubicTextureEffect_DEFINED
10 10
(...skipping 24 matching lines...) Expand all
35 const GrTextureDomain& domain() const { return fDomain; } 35 const GrTextureDomain& domain() const { return fDomain; }
36 36
37 /** 37 /**
38 * Create a simple filter effect with custom bicubic coefficients and option al domain. 38 * Create a simple filter effect with custom bicubic coefficients and option al domain.
39 */ 39 */
40 static GrEffect* Create(GrTexture* tex, const SkScalar coefficients[16], 40 static GrEffect* Create(GrTexture* tex, const SkScalar coefficients[16],
41 const SkRect* domain = NULL) { 41 const SkRect* domain = NULL) {
42 if (NULL == domain) { 42 if (NULL == domain) {
43 static const SkShader::TileMode kTileModes[] = { SkShader::kClamp_Ti leMode, 43 static const SkShader::TileMode kTileModes[] = { SkShader::kClamp_Ti leMode,
44 SkShader::kClamp_Ti leMode }; 44 SkShader::kClamp_Ti leMode };
45 return Create(tex, coefficients, MakeDivByTextureWHMatrix(tex), kTil eModes); 45 return Create(tex, coefficients, GrCoordTransform::MakeDivByTextureW HMatrix(tex),
46 kTileModes);
46 } else { 47 } else {
47 return SkNEW_ARGS(GrBicubicEffect, (tex, coefficients, 48 return SkNEW_ARGS(GrBicubicEffect, (tex, coefficients,
48 MakeDivByTextureWHMatrix(tex), * domain)); 49 GrCoordTransform::MakeDivByTextu reWHMatrix(tex),
50 *domain));
49 } 51 }
50 } 52 }
51 53
52 /** 54 /**
53 * Create a Mitchell filter effect with specified texture matrix and x/y til e modes. 55 * Create a Mitchell filter effect with specified texture matrix and x/y til e modes.
54 */ 56 */
55 static GrEffect* Create(GrTexture* tex, const SkMatrix& matrix, 57 static GrEffect* Create(GrTexture* tex, const SkMatrix& matrix,
56 SkShader::TileMode tileModes[2]) { 58 SkShader::TileMode tileModes[2]) {
57 return Create(tex, gMitchellCoefficients, matrix, tileModes); 59 return Create(tex, gMitchellCoefficients, matrix, tileModes);
58 } 60 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 GrTextureDomain fDomain; 96 GrTextureDomain fDomain;
95 97
96 GR_DECLARE_EFFECT_TEST; 98 GR_DECLARE_EFFECT_TEST;
97 99
98 static const SkScalar gMitchellCoefficients[16]; 100 static const SkScalar gMitchellCoefficients[16];
99 101
100 typedef GrSingleTextureEffect INHERITED; 102 typedef GrSingleTextureEffect INHERITED;
101 }; 103 };
102 104
103 #endif 105 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/Gr1DKernelEffect.h ('k') | src/gpu/effects/GrMatrixConvolutionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698