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

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

Issue 137423005: Implement a computeFastBounds() traversal for SkImageFilter. This allows for correct culling of pri… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix Win build; update to ToT Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/effects/SkBitmapSource.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkPaint.h" 9 #include "SkPaint.h"
10 #include "SkAnnotation.h" 10 #include "SkAnnotation.h"
(...skipping 2270 matching lines...) Expand 10 before | Expand all | Expand 10 after
2281 storage->set(src->fLeft - radius, src->fTop - radius, 2281 storage->set(src->fLeft - radius, src->fTop - radius,
2282 src->fRight + radius, src->fBottom + radius); 2282 src->fRight + radius, src->fBottom + radius);
2283 } else { 2283 } else {
2284 *storage = *src; 2284 *storage = *src;
2285 } 2285 }
2286 2286
2287 if (this->getMaskFilter()) { 2287 if (this->getMaskFilter()) {
2288 this->getMaskFilter()->computeFastBounds(*storage, storage); 2288 this->getMaskFilter()->computeFastBounds(*storage, storage);
2289 } 2289 }
2290 2290
2291 if (this->getImageFilter()) {
2292 this->getImageFilter()->computeFastBounds(*storage, storage);
2293 }
2294
2291 return *storage; 2295 return *storage;
2292 } 2296 }
2293 2297
2294 #ifdef SK_DEVELOPER 2298 #ifdef SK_DEVELOPER
2295 void SkPaint::toString(SkString* str) const { 2299 void SkPaint::toString(SkString* str) const {
2296 str->append("<dl><dt>SkPaint:</dt><dd><dl>"); 2300 str->append("<dl><dt>SkPaint:</dt><dd><dl>");
2297 2301
2298 SkTypeface* typeface = this->getTypeface(); 2302 SkTypeface* typeface = this->getTypeface();
2299 if (NULL != typeface) { 2303 if (NULL != typeface) {
2300 SkDynamicMemoryWStream ostream; 2304 SkDynamicMemoryWStream ostream;
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
2577 case SkXfermode::kPlus_Mode: 2581 case SkXfermode::kPlus_Mode:
2578 return 0 == this->getAlpha(); 2582 return 0 == this->getAlpha();
2579 case SkXfermode::kDst_Mode: 2583 case SkXfermode::kDst_Mode:
2580 return true; 2584 return true;
2581 default: 2585 default:
2582 break; 2586 break;
2583 } 2587 }
2584 } 2588 }
2585 return false; 2589 return false;
2586 } 2590 }
OLDNEW
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/effects/SkBitmapSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698