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 340413004: Revert "Fix external SkImageFilter caching with clips." (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | 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 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 cache->set(this, *result, *offset); 115 cache->set(this, *result, *offset);
116 return true; 116 return true;
117 } 117 }
118 return false; 118 return false;
119 } 119 }
120 120
121 bool SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm, 121 bool SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm,
122 SkIRect* dst) const { 122 SkIRect* dst) const {
123 SkASSERT(&src); 123 SkASSERT(&src);
124 SkASSERT(dst); 124 SkASSERT(dst);
125 if (SkImageFilter::GetExternalCache()) {
126 /*
127 * When the external cache is active, do not intersect the saveLayer
128 * bounds with the clip bounds. This is so that the cached result
129 * is always the full size of the primitive's bounds,
130 * regardless of the clip active on first draw.
131 */
132 *dst = SkIRect::MakeLargest();
133 return true;
134 }
135 return this->onFilterBounds(src, ctm, dst); 125 return this->onFilterBounds(src, ctm, dst);
136 } 126 }
137 127
138 void SkImageFilter::computeFastBounds(const SkRect& src, SkRect* dst) const { 128 void SkImageFilter::computeFastBounds(const SkRect& src, SkRect* dst) const {
139 if (0 == fInputCount) { 129 if (0 == fInputCount) {
140 *dst = src; 130 *dst = src;
141 return; 131 return;
142 } 132 }
143 if (this->getInput(0)) { 133 if (this->getInput(0)) {
144 this->getInput(0)->computeFastBounds(src, dst); 134 this->getInput(0)->computeFastBounds(src, dst);
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 423
434 CacheImpl::~CacheImpl() { 424 CacheImpl::~CacheImpl() {
435 SkTDynamicHash<Value, Key>::Iter iter(&fData); 425 SkTDynamicHash<Value, Key>::Iter iter(&fData);
436 426
437 while (!iter.done()) { 427 while (!iter.done()) {
438 Value* v = &*iter; 428 Value* v = &*iter;
439 ++iter; 429 ++iter;
440 delete v; 430 delete v;
441 } 431 }
442 } 432 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698