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

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

Issue 956083002: Revert of Pass clip to context (Closed) Base URL: https://skia.googlesource.com/skia.git@pass_down_rendertarget
Patch Set: Created 5 years, 9 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/SkMaskFilter.cpp ('k') | src/effects/SkBlurMaskFilter.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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 286
287 { 287 {
288 GrPaint grPaint; 288 GrPaint grPaint;
289 grPaint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode); 289 grPaint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
290 SkRegion::Iterator iter(fRegion); 290 SkRegion::Iterator iter(fRegion);
291 context->clear(NULL, 0x0, true, maskTexture->asRenderTarget()); 291 context->clear(NULL, 0x0, true, maskTexture->asRenderTarget());
292 292
293 while (!iter.done()) { 293 while (!iter.done()) {
294 SkRect rect = SkRect::Make(iter.rect()); 294 SkRect rect = SkRect::Make(iter.rect());
295 context->drawRect(maskTexture->asRenderTarget(), GrClip::WideOpe n(), grPaint, 295 context->drawRect(maskTexture->asRenderTarget(), grPaint, in_mat rix, rect);
296 in_matrix, rect);
297 iter.next(); 296 iter.next();
298 } 297 }
299 } 298 }
300 299
301 *fp = AlphaThresholdEffect::Create(texture, 300 *fp = AlphaThresholdEffect::Create(texture,
302 maskTexture, 301 maskTexture,
303 fInnerThreshold, 302 fInnerThreshold,
304 fOuterThreshold); 303 fOuterThreshold);
305 } 304 }
306 return true; 305 return true;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 } 376 }
378 377
379 #ifndef SK_IGNORE_TO_STRING 378 #ifndef SK_IGNORE_TO_STRING
380 void SkAlphaThresholdFilterImpl::toString(SkString* str) const { 379 void SkAlphaThresholdFilterImpl::toString(SkString* str) const {
381 str->appendf("SkAlphaThresholdImageFilter: ("); 380 str->appendf("SkAlphaThresholdImageFilter: (");
382 str->appendf("inner: %f outer: %f", fInnerThreshold, fOuterThreshold); 381 str->appendf("inner: %f outer: %f", fInnerThreshold, fOuterThreshold);
383 str->append(")"); 382 str->append(")");
384 } 383 }
385 #endif 384 #endif
386 385
OLDNEW
« no previous file with comments | « src/core/SkMaskFilter.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698