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

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

Issue 1348583002: Make skpaint->grpaint flow work for composing draws (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unused inheriteds to satisfy clang Created 5 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/core/SkBitmapProcShader.cpp ('k') | src/core/SkLightingShader.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 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 SkPaint pnt(paint); 198 SkPaint pnt(paint);
199 SkAutoTUnref<SkShader> shader(atlas->newShader(SkShader::kClamp_TileMode , 199 SkAutoTUnref<SkShader> shader(atlas->newShader(SkShader::kClamp_TileMode ,
200 SkShader::kClamp_TileMode , 200 SkShader::kClamp_TileMode ,
201 &localM)); 201 &localM));
202 if (!shader) { 202 if (!shader) {
203 break; 203 break;
204 } 204 }
205 pnt.setShader(shader); 205 pnt.setShader(shader);
206 206
207 if (colors && colors[i] != SK_ColorWHITE) { 207 if (colors) {
208 SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(color s[i], mode)); 208 SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(color s[i], mode));
209 pnt.setColorFilter(cf); 209 pnt.setColorFilter(cf);
210 } 210 }
211 211
212 path.rewind(); 212 path.rewind();
213 path.addPoly(quad, 4, true); 213 path.addPoly(quad, 4, true);
214 path.setConvexity(SkPath::kConvex_Convexity); 214 path.setConvexity(SkPath::kConvex_Convexity);
215 this->drawPath(draw, path, pnt, nullptr, true); 215 this->drawPath(draw, path, pnt, nullptr, true);
216 } 216 }
217 } 217 }
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 if (kUnknown_SkPixelGeometry == fSurfaceProps.pixelGeometry() 412 if (kUnknown_SkPixelGeometry == fSurfaceProps.pixelGeometry()
413 || this->onShouldDisableLCD(paint)) { 413 || this->onShouldDisableLCD(paint)) {
414 414
415 flags &= ~SkPaint::kLCDRenderText_Flag; 415 flags &= ~SkPaint::kLCDRenderText_Flag;
416 flags |= SkPaint::kGenA8FromLCD_Flag; 416 flags |= SkPaint::kGenA8FromLCD_Flag;
417 } 417 }
418 418
419 return flags; 419 return flags;
420 } 420 }
421 421
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcShader.cpp ('k') | src/core/SkLightingShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698