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

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

Issue 2396953002: Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints" (Closed)
Patch Set: add tmp virtual to unroll legacy arithmodes Created 4 years, 2 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/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.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 "SkMergeImageFilter.h" 8 #include "SkMergeImageFilter.h"
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 canvas->clear(0x0); 124 canvas->clear(0x0);
125 125
126 // Composite all of the filter inputs. 126 // Composite all of the filter inputs.
127 for (int i = 0; i < inputCount; ++i) { 127 for (int i = 0; i < inputCount; ++i) {
128 if (!inputs[i]) { 128 if (!inputs[i]) {
129 continue; 129 continue;
130 } 130 }
131 131
132 SkPaint paint; 132 SkPaint paint;
133 if (fModes) { 133 if (fModes) {
134 paint.setXfermodeMode((SkXfermode::Mode)fModes[i]); 134 paint.setBlendMode((SkBlendMode)fModes[i]);
135 } 135 }
136 136
137 inputs[i]->draw(canvas, 137 inputs[i]->draw(canvas,
138 SkIntToScalar(offsets[i].x() - x0), SkIntToScalar(offset s[i].y() - y0), 138 SkIntToScalar(offsets[i].x() - x0), SkIntToScalar(offset s[i].y() - y0),
139 &paint); 139 &paint);
140 } 140 }
141 141
142 offset->fX = bounds.left(); 142 offset->fX = bounds.left();
143 offset->fY = bounds.top(); 143 offset->fY = bounds.top();
144 return surf->makeImageSnapshot(); 144 return surf->makeImageSnapshot();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 for (int i = 0; i < this->countInputs(); ++i) { 185 for (int i = 0; i < this->countInputs(); ++i) {
186 SkImageFilter* filter = this->getInput(i); 186 SkImageFilter* filter = this->getInput(i);
187 str->appendf("%d: (", i); 187 str->appendf("%d: (", i);
188 filter->toString(str); 188 filter->toString(str);
189 str->appendf(")"); 189 str->appendf(")");
190 } 190 }
191 191
192 str->append(")"); 192 str->append(")");
193 } 193 }
194 #endif 194 #endif
OLDNEW
« no previous file with comments | « src/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698