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

Side by Side Diff: src/gpu/GrTextContext.cpp

Issue 1313623002: Add support for blending of LCD for all blend modes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright 2010 Google Inc. 2 * Copyright 2010 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 "GrTextContext.h" 8 #include "GrTextContext.h"
9 #include "GrBlurUtils.h" 9 #include "GrBlurUtils.h"
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return; 71 return;
72 } 72 }
73 textContext = textContext->fFallbackTextContext; 73 textContext = textContext->fFallbackTextContext;
74 } while (textContext); 74 } while (textContext);
75 75
76 // fall back to drawing as a path 76 // fall back to drawing as a path
77 this->drawPosTextAsPath(dc, rt, clip, skPaint, viewMatrix, text, byteLength, pos, 77 this->drawPosTextAsPath(dc, rt, clip, skPaint, viewMatrix, text, byteLength, pos,
78 scalarsPerPosition, offset, clipBounds); 78 scalarsPerPosition, offset, clipBounds);
79 } 79 }
80 80
81 bool GrTextContext::ShouldDisableLCD(const SkPaint& paint) { 81 bool GrTextContext::ShouldDisableLCD(const SkPaint& paint) {
robertphillips 2015/09/03 13:28:41 Can't we just pass nullptr to AsMode ?
egdaniel 2015/09/03 13:50:38 Oh yeah, i originally had null here, then changed
82 SkXfermode::Mode mode;
82 if (paint.getShader() || 83 if (paint.getShader() ||
83 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode) || 84 !SkXfermode::AsMode(paint.getXfermode(), &mode) ||
84 paint.getMaskFilter() || 85 paint.getMaskFilter() ||
85 paint.getRasterizer() || 86 paint.getRasterizer() ||
86 paint.getColorFilter() || 87 paint.getColorFilter() ||
87 paint.getPathEffect() || 88 paint.getPathEffect() ||
88 paint.isFakeBoldText() || 89 paint.isFakeBoldText() ||
89 paint.getStyle() != SkPaint::kFill_Style) 90 paint.getStyle() != SkPaint::kFill_Style)
90 { 91 {
91 return true; 92 return true;
92 } 93 }
93 return false; 94 return false;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 if (cache->getAuxProcData(GlyphCacheAuxProc, &auxData)) { 272 if (cache->getAuxProcData(GlyphCacheAuxProc, &auxData)) {
272 scaler = (GrFontScaler*)auxData; 273 scaler = (GrFontScaler*)auxData;
273 } 274 }
274 if (nullptr == scaler) { 275 if (nullptr == scaler) {
275 scaler = new GrFontScaler(cache); 276 scaler = new GrFontScaler(cache);
276 cache->setAuxProc(GlyphCacheAuxProc, scaler); 277 cache->setAuxProc(GlyphCacheAuxProc, scaler);
277 } 278 }
278 279
279 return scaler; 280 return scaler;
280 } 281 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698