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

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

Issue 1823243002: Remove SK_SUPPORT_LEGACY_FILTERBOUNDS_RETURN. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « include/core/SkImageFilter.h ('k') | no next file » | 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 #include "SkImageFilterCacheKey.h" 9 #include "SkImageFilterCacheKey.h"
10 10
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 SkAutoTUnref<SkSpecialImage> tmp(input->onFilterImage(specialSrc.get(), 283 SkAutoTUnref<SkSpecialImage> tmp(input->onFilterImage(specialSrc.get(),
284 this->mapContext(ctx), 284 this->mapContext(ctx),
285 offset)); 285 offset));
286 if (!tmp) { 286 if (!tmp) {
287 return false; 287 return false;
288 } 288 }
289 289
290 return tmp->internal_getBM(result); 290 return tmp->internal_getBM(result);
291 } 291 }
292 292
293 #ifdef SK_SUPPORT_LEGACY_FILTERBOUNDS_RETURN
294 bool SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm, SkIRec t* dst,
295 MapDirection direction) const {
296 *dst = filterBounds(src, ctm, direction);
297 return true;
298 }
299 #endif
300
301 SkIRect SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm, 293 SkIRect SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm,
302 MapDirection direction) const { 294 MapDirection direction) const {
303 if (kReverse_MapDirection == direction) { 295 if (kReverse_MapDirection == direction) {
304 SkIRect bounds = this->onFilterNodeBounds(src, ctm, direction); 296 SkIRect bounds = this->onFilterNodeBounds(src, ctm, direction);
305 return this->onFilterBounds(bounds, ctm, direction); 297 return this->onFilterBounds(bounds, ctm, direction);
306 } else { 298 } else {
307 SkIRect bounds = this->onFilterBounds(src, ctm, direction); 299 SkIRect bounds = this->onFilterBounds(src, ctm, direction);
308 bounds = this->onFilterNodeBounds(bounds, ctm, direction); 300 bounds = this->onFilterNodeBounds(bounds, ctm, direction);
309 SkIRect dst; 301 SkIRect dst;
310 this->getCropRect().applyTo(bounds, ctm, &dst); 302 this->getCropRect().applyTo(bounds, ctm, &dst);
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 } 798 }
807 return dev; 799 return dev;
808 } 800 }
809 801
810 bool SkImageFilter::DeviceProxy::filterImage(const SkImageFilter* filter, const SkBitmap& src, 802 bool SkImageFilter::DeviceProxy::filterImage(const SkImageFilter* filter, const SkBitmap& src,
811 const SkImageFilter::Context& ctx, 803 const SkImageFilter::Context& ctx,
812 SkBitmap* result, SkIPoint* offset) { 804 SkBitmap* result, SkIPoint* offset) {
813 return fDevice->filterImage(filter, src, ctx, result, offset); 805 return fDevice->filterImage(filter, src, ctx, result, offset);
814 } 806 }
815 807
OLDNEW
« no previous file with comments | « include/core/SkImageFilter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698