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

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

Issue 1313573005: Revert of Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: Created 5 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/GrBezierEffect.cpp ('k') | src/gpu/effects/GrBitmapTextGeoProc.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 2014 Google Inc. 2 * Copyright 2014 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 #include "GrBicubicEffect.h" 8 #include "GrBicubicEffect.h"
9 #include "GrInvariantOutput.h" 9 #include "GrInvariantOutput.h"
10 #include "gl/builders/GrGLProgramBuilder.h" 10 #include "gl/builders/GrGLProgramBuilder.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 fDomain == s.fDomain; 168 fDomain == s.fDomain;
169 } 169 }
170 170
171 void GrBicubicEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const { 171 void GrBicubicEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
172 // FIXME: Perhaps we can do better. 172 // FIXME: Perhaps we can do better.
173 inout->mulByUnknownSingleComponent(); 173 inout->mulByUnknownSingleComponent();
174 } 174 }
175 175
176 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrBicubicEffect); 176 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrBicubicEffect);
177 177
178 const GrFragmentProcessor* GrBicubicEffect::TestCreate(GrProcessorTestData* d) { 178 GrFragmentProcessor* GrBicubicEffect::TestCreate(GrProcessorTestData* d) {
179 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : 179 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx :
180 GrProcessorUnitTest::kAlphaTextureIdx; 180 GrProcessorUnitTest::kAlphaTextureIdx;
181 SkScalar coefficients[16]; 181 SkScalar coefficients[16];
182 for (int i = 0; i < 16; i++) { 182 for (int i = 0; i < 16; i++) {
183 coefficients[i] = d->fRandom->nextSScalar1(); 183 coefficients[i] = d->fRandom->nextSScalar1();
184 } 184 }
185 return GrBicubicEffect::Create(d->fProcDataManager, d->fTextures[texIdx], co efficients); 185 return GrBicubicEffect::Create(d->fProcDataManager, d->fTextures[texIdx], co efficients);
186 } 186 }
187 187
188 ////////////////////////////////////////////////////////////////////////////// 188 //////////////////////////////////////////////////////////////////////////////
(...skipping 21 matching lines...) Expand all
210 // Use bilerp to handle rotation or fractional translation. 210 // Use bilerp to handle rotation or fractional translation.
211 *filterMode = GrTextureParams::kBilerp_FilterMode; 211 *filterMode = GrTextureParams::kBilerp_FilterMode;
212 } 212 }
213 return false; 213 return false;
214 } 214 }
215 // When we use the bicubic filtering effect each sample is read from the tex ture using 215 // When we use the bicubic filtering effect each sample is read from the tex ture using
216 // nearest neighbor sampling. 216 // nearest neighbor sampling.
217 *filterMode = GrTextureParams::kNone_FilterMode; 217 *filterMode = GrTextureParams::kNone_FilterMode;
218 return true; 218 return true;
219 } 219 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBezierEffect.cpp ('k') | src/gpu/effects/GrBitmapTextGeoProc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698