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

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

Issue 1497083005: Revert of Matrix convolution bounds fix; affectsTransparentBlack fixes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 SkASSERT(1 == this->countInputs()); 92 SkASSERT(1 == this->countInputs());
93 if (!this->cropRectIsSet()) { 93 if (!this->cropRectIsSet()) {
94 if (filter) { 94 if (filter) {
95 *filter = SkRef(fColorFilter); 95 *filter = SkRef(fColorFilter);
96 } 96 }
97 return true; 97 return true;
98 } 98 }
99 return false; 99 return false;
100 } 100 }
101 101
102 bool SkColorFilterImageFilter::canComputeFastBounds() const { 102 bool SkColorFilterImageFilter::affectsTransparentBlack() const {
103 if (fColorFilter->affectsTransparentBlack()) { 103 return fColorFilter->affectsTransparentBlack();
104 return false;
105 }
106 return INHERITED::canComputeFastBounds();
107 } 104 }
108 105
109 #ifndef SK_IGNORE_TO_STRING 106 #ifndef SK_IGNORE_TO_STRING
110 void SkColorFilterImageFilter::toString(SkString* str) const { 107 void SkColorFilterImageFilter::toString(SkString* str) const {
111 str->appendf("SkColorFilterImageFilter: ("); 108 str->appendf("SkColorFilterImageFilter: (");
112 109
113 str->appendf("input: ("); 110 str->appendf("input: (");
114 111
115 if (this->getInput(0)) { 112 if (this->getInput(0)) {
116 this->getInput(0)->toString(str); 113 this->getInput(0)->toString(str);
117 } 114 }
118 115
119 str->appendf(") color filter: "); 116 str->appendf(") color filter: ");
120 fColorFilter->toString(str); 117 fColorFilter->toString(str);
121 118
122 str->append(")"); 119 str->append(")");
123 } 120 }
124 #endif 121 #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