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

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

Issue 1422703009: Revert[4] of "stop using drawSprite (at least w/ no filters) as it is going away" (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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/SkColorFilterImageFilter.cpp ('k') | src/gpu/GrRecordReplaceDraw.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 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkDevice.h" 10 #include "SkDevice.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 SkBitmap input = src; 84 SkBitmap input = src;
85 SkIPoint pos = SkIPoint::Make(0, 0); 85 SkIPoint pos = SkIPoint::Make(0, 0);
86 if (!this->filterInput(i, proxy, src, ctx, &input, &pos)) { 86 if (!this->filterInput(i, proxy, src, ctx, &input, &pos)) {
87 continue; 87 continue;
88 } 88 }
89 if (fModes) { 89 if (fModes) {
90 paint.setXfermodeMode((SkXfermode::Mode)fModes[i]); 90 paint.setXfermodeMode((SkXfermode::Mode)fModes[i]);
91 } else { 91 } else {
92 paint.setXfermode(nullptr); 92 paint.setXfermode(nullptr);
93 } 93 }
94 canvas.drawSprite(input, pos.x() - x0, pos.y() - y0, &paint); 94 canvas.drawBitmap(input, SkIntToScalar(pos.x() - x0), SkIntToScalar(pos. y() - y0), &paint);
95 didProduceResult = true; 95 didProduceResult = true;
96 } 96 }
97 97
98 if (!didProduceResult) 98 if (!didProduceResult)
99 return false; 99 return false;
100 100
101 offset->fX = bounds.left(); 101 offset->fX = bounds.left();
102 offset->fY = bounds.top(); 102 offset->fY = bounds.top();
103 *result = dst->accessBitmap(false); 103 *result = dst->accessBitmap(false);
104 return true; 104 return true;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 for (int i = 0; i < this->countInputs(); ++i) { 145 for (int i = 0; i < this->countInputs(); ++i) {
146 SkImageFilter* filter = this->getInput(i); 146 SkImageFilter* filter = this->getInput(i);
147 str->appendf("%d: (", i); 147 str->appendf("%d: (", i);
148 filter->toString(str); 148 filter->toString(str);
149 str->appendf(")"); 149 str->appendf(")");
150 } 150 }
151 151
152 str->append(")"); 152 str->append(")");
153 } 153 }
154 #endif 154 #endif
OLDNEW
« no previous file with comments | « src/effects/SkColorFilterImageFilter.cpp ('k') | src/gpu/GrRecordReplaceDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698