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

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

Issue 356513003: Step towards variable length effect keys. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak comment Created 6 years, 5 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
OLDNEW
1 /*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
1 #include "GrBicubicEffect.h" 8 #include "GrBicubicEffect.h"
2 9
10 #include "gl/GrGLShaderBuilder.h"
11
3 #define DS(x) SkDoubleToScalar(x) 12 #define DS(x) SkDoubleToScalar(x)
4 13
5 const SkScalar GrBicubicEffect::gMitchellCoefficients[16] = { 14 const SkScalar GrBicubicEffect::gMitchellCoefficients[16] = {
6 DS( 1.0 / 18.0), DS(-9.0 / 18.0), DS( 15.0 / 18.0), DS( -7.0 / 18.0), 15 DS( 1.0 / 18.0), DS(-9.0 / 18.0), DS( 15.0 / 18.0), DS( -7.0 / 18.0),
7 DS(16.0 / 18.0), DS( 0.0 / 18.0), DS(-36.0 / 18.0), DS( 21.0 / 18.0), 16 DS(16.0 / 18.0), DS( 0.0 / 18.0), DS(-36.0 / 18.0), DS( 21.0 / 18.0),
8 DS( 1.0 / 18.0), DS( 9.0 / 18.0), DS( 27.0 / 18.0), DS(-21.0 / 18.0), 17 DS( 1.0 / 18.0), DS( 9.0 / 18.0), DS( 27.0 / 18.0), DS(-21.0 / 18.0),
9 DS( 0.0 / 18.0), DS( 0.0 / 18.0), DS( -6.0 / 18.0), DS( 7.0 / 18.0), 18 DS( 0.0 / 18.0), DS( 0.0 / 18.0), DS( -6.0 / 18.0), DS( 7.0 / 18.0),
10 }; 19 };
11 20
12 21
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 // Use bilerp to handle rotation or fractional translation. 212 // Use bilerp to handle rotation or fractional translation.
204 *filterMode = GrTextureParams::kBilerp_FilterMode; 213 *filterMode = GrTextureParams::kBilerp_FilterMode;
205 } 214 }
206 return false; 215 return false;
207 } 216 }
208 // When we use the bicubic filtering effect each sample is read from the tex ture using 217 // When we use the bicubic filtering effect each sample is read from the tex ture using
209 // nearest neighbor sampling. 218 // nearest neighbor sampling.
210 *filterMode = GrTextureParams::kNone_FilterMode; 219 *filterMode = GrTextureParams::kNone_FilterMode;
211 return true; 220 return true;
212 } 221 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698