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

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

Issue 1848953002: Image filters: optimize crop rect application (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixes per review remarks Created 4 years, 8 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/SkImageFilter.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.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 "SkColorFilterImageFilter.h" 8 #include "SkColorFilterImageFilter.h"
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 SkASSERT(1 == this->countInputs()); 99 SkASSERT(1 == this->countInputs());
100 if (!this->cropRectIsSet()) { 100 if (!this->cropRectIsSet()) {
101 if (filter) { 101 if (filter) {
102 *filter = SkRef(fColorFilter.get()); 102 *filter = SkRef(fColorFilter.get());
103 } 103 }
104 return true; 104 return true;
105 } 105 }
106 return false; 106 return false;
107 } 107 }
108 108
109 bool SkColorFilterImageFilter::canComputeFastBounds() const { 109 bool SkColorFilterImageFilter::affectsTransparentBlack() const {
110 if (fColorFilter->affectsTransparentBlack()) { 110 return fColorFilter->affectsTransparentBlack();
111 return false;
112 }
113 return INHERITED::canComputeFastBounds();
114 } 111 }
115 112
116 #ifndef SK_IGNORE_TO_STRING 113 #ifndef SK_IGNORE_TO_STRING
117 void SkColorFilterImageFilter::toString(SkString* str) const { 114 void SkColorFilterImageFilter::toString(SkString* str) const {
118 str->appendf("SkColorFilterImageFilter: ("); 115 str->appendf("SkColorFilterImageFilter: (");
119 116
120 str->appendf("input: ("); 117 str->appendf("input: (");
121 118
122 if (this->getInput(0)) { 119 if (this->getInput(0)) {
123 this->getInput(0)->toString(str); 120 this->getInput(0)->toString(str);
124 } 121 }
125 122
126 str->appendf(") color filter: "); 123 str->appendf(") color filter: ");
127 fColorFilter->toString(str); 124 fColorFilter->toString(str);
128 125
129 str->append(")"); 126 str->append(")");
130 } 127 }
131 #endif 128 #endif
OLDNEW
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698