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

Side by Side Diff: src/core/SkImageFilter.cpp

Issue 1409753008: Rename non-aa rect methods on GrDrawContext in anticipation of making them support aa (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 5 years, 1 month 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 | « include/gpu/GrDrawContext.h ('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 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
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 "SkImageFilter.h" 8 #include "SkImageFilter.h"
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 bounds.offset(-srcOffset); 373 bounds.offset(-srcOffset);
374 SkMatrix matrix(ctx.ctm()); 374 SkMatrix matrix(ctx.ctm());
375 matrix.postTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.to p())); 375 matrix.postTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.to p()));
376 GrPaint paint; 376 GrPaint paint;
377 if (this->asFragmentProcessor(&fp, srcTexture, matrix, bounds)) { 377 if (this->asFragmentProcessor(&fp, srcTexture, matrix, bounds)) {
378 SkASSERT(fp); 378 SkASSERT(fp);
379 paint.addColorFragmentProcessor(fp)->unref(); 379 paint.addColorFragmentProcessor(fp)->unref();
380 380
381 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(dst->asRend erTarget())); 381 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(dst->asRend erTarget()));
382 if (drawContext) { 382 if (drawContext) {
383 drawContext->drawNonAARectToRect(clip, paint, SkMatrix::I(), dstRect , srcRect); 383 drawContext->fillRectToRect(clip, paint, SkMatrix::I(), dstRect, src Rect);
384 384
385 WrapTexture(dst, bounds.width(), bounds.height(), result); 385 WrapTexture(dst, bounds.width(), bounds.height(), result);
386 return true; 386 return true;
387 } 387 }
388 } 388 }
389 #endif 389 #endif
390 return false; 390 return false;
391 } 391 }
392 392
393 bool SkImageFilter::applyCropRect(const Context& ctx, const SkBitmap& src, 393 bool SkImageFilter::applyCropRect(const Context& ctx, const SkBitmap& src,
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 } 632 }
633 return dev; 633 return dev;
634 } 634 }
635 635
636 bool SkImageFilter::DeviceProxy::filterImage(const SkImageFilter* filter, const SkBitmap& src, 636 bool SkImageFilter::DeviceProxy::filterImage(const SkImageFilter* filter, const SkBitmap& src,
637 const SkImageFilter::Context& ctx, 637 const SkImageFilter::Context& ctx,
638 SkBitmap* result, SkIPoint* offset) { 638 SkBitmap* result, SkIPoint* offset) {
639 return fDevice->filterImage(filter, src, ctx, result, offset); 639 return fDevice->filterImage(filter, src, ctx, result, offset);
640 } 640 }
641 641
OLDNEW
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698