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

Side by Side Diff: src/core/SkDevice.cpp

Issue 1825073002: Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove flag Created 4 years, 9 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/SkColorMatrixFilterRowMajor255.cpp ('k') | src/core/SkModeColorFilter.h » ('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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
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 "SkColorFilter.h" 8 #include "SkColorFilter.h"
9 #include "SkDevice.h" 9 #include "SkDevice.h"
10 #include "SkDraw.h" 10 #include "SkDraw.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 SkPaint pnt(paint); 200 SkPaint pnt(paint);
201 sk_sp<SkShader> shader = atlas->makeShader(SkShader::kClamp_TileMode, 201 sk_sp<SkShader> shader = atlas->makeShader(SkShader::kClamp_TileMode,
202 SkShader::kClamp_TileMode, 202 SkShader::kClamp_TileMode,
203 &localM); 203 &localM);
204 if (!shader) { 204 if (!shader) {
205 break; 205 break;
206 } 206 }
207 pnt.setShader(std::move(shader)); 207 pnt.setShader(std::move(shader));
208 208
209 if (colors) { 209 if (colors) {
210 SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(color s[i], mode)); 210 pnt.setColorFilter(SkColorFilter::MakeModeFilter(colors[i], mode));
211 pnt.setColorFilter(cf);
212 } 211 }
213 212
214 path.rewind(); 213 path.rewind();
215 path.addPoly(quad, 4, true); 214 path.addPoly(quad, 4, true);
216 path.setConvexity(SkPath::kConvex_Convexity); 215 path.setConvexity(SkPath::kConvex_Convexity);
217 this->drawPath(draw, path, pnt, nullptr, true); 216 this->drawPath(draw, path, pnt, nullptr, true);
218 } 217 }
219 } 218 }
220 219
221 //////////////////////////////////////////////////////////////////////////////// /////////////////// 220 //////////////////////////////////////////////////////////////////////////////// ///////////////////
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 if (kUnknown_SkPixelGeometry == fSurfaceProps.pixelGeometry() 445 if (kUnknown_SkPixelGeometry == fSurfaceProps.pixelGeometry()
447 || this->onShouldDisableLCD(paint)) { 446 || this->onShouldDisableLCD(paint)) {
448 447
449 flags &= ~SkPaint::kLCDRenderText_Flag; 448 flags &= ~SkPaint::kLCDRenderText_Flag;
450 flags |= SkPaint::kGenA8FromLCD_Flag; 449 flags |= SkPaint::kGenA8FromLCD_Flag;
451 } 450 }
452 451
453 return flags; 452 return flags;
454 } 453 }
455 454
OLDNEW
« no previous file with comments | « src/core/SkColorMatrixFilterRowMajor255.cpp ('k') | src/core/SkModeColorFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698