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

Side by Side Diff: src/effects/SkAlphaThresholdFilter.cpp

Issue 1316513002: Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: Address comments, fix roll(?) 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/core/SkShader.cpp ('k') | src/effects/SkArithmeticMode_gpu.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 #include "SkAlphaThresholdFilter.h" 8 #include "SkAlphaThresholdFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkReadBuffer.h" 10 #include "SkReadBuffer.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 const GrProcessor& proc) { 188 const GrProcessor& proc) {
189 const AlphaThresholdEffect& alpha_threshold = proc.cast<AlphaThresholdEffect >(); 189 const AlphaThresholdEffect& alpha_threshold = proc.cast<AlphaThresholdEffect >();
190 pdman.set1f(fInnerThresholdVar, alpha_threshold.innerThreshold()); 190 pdman.set1f(fInnerThresholdVar, alpha_threshold.innerThreshold());
191 pdman.set1f(fOuterThresholdVar, alpha_threshold.outerThreshold()); 191 pdman.set1f(fOuterThresholdVar, alpha_threshold.outerThreshold());
192 } 192 }
193 193
194 ///////////////////////////////////////////////////////////////////// 194 /////////////////////////////////////////////////////////////////////
195 195
196 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(AlphaThresholdEffect); 196 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(AlphaThresholdEffect);
197 197
198 GrFragmentProcessor* AlphaThresholdEffect::TestCreate(GrProcessorTestData* d) { 198 const GrFragmentProcessor* AlphaThresholdEffect::TestCreate(GrProcessorTestData* d) {
199 GrTexture* bmpTex = d->fTextures[GrProcessorUnitTest::kSkiaPMTextureIdx]; 199 GrTexture* bmpTex = d->fTextures[GrProcessorUnitTest::kSkiaPMTextureIdx];
200 GrTexture* maskTex = d->fTextures[GrProcessorUnitTest::kAlphaTextureIdx]; 200 GrTexture* maskTex = d->fTextures[GrProcessorUnitTest::kAlphaTextureIdx];
201 float innerThresh = d->fRandom->nextUScalar1(); 201 float innerThresh = d->fRandom->nextUScalar1();
202 float outerThresh = d->fRandom->nextUScalar1(); 202 float outerThresh = d->fRandom->nextUScalar1();
203 return AlphaThresholdEffect::Create(d->fProcDataManager, bmpTex, maskTex, in nerThresh, 203 return AlphaThresholdEffect::Create(d->fProcDataManager, bmpTex, maskTex, in nerThresh,
204 outerThresh); 204 outerThresh);
205 } 205 }
206 206
207 /////////////////////////////////////////////////////////////////////////////// 207 ///////////////////////////////////////////////////////////////////////////////
208 208
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 } 372 }
373 373
374 #ifndef SK_IGNORE_TO_STRING 374 #ifndef SK_IGNORE_TO_STRING
375 void SkAlphaThresholdFilterImpl::toString(SkString* str) const { 375 void SkAlphaThresholdFilterImpl::toString(SkString* str) const {
376 str->appendf("SkAlphaThresholdImageFilter: ("); 376 str->appendf("SkAlphaThresholdImageFilter: (");
377 str->appendf("inner: %f outer: %f", fInnerThreshold, fOuterThreshold); 377 str->appendf("inner: %f outer: %f", fInnerThreshold, fOuterThreshold);
378 str->append(")"); 378 str->append(")");
379 } 379 }
380 #endif 380 #endif
381 381
OLDNEW
« no previous file with comments | « src/core/SkShader.cpp ('k') | src/effects/SkArithmeticMode_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698