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

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
« no previous file with comments | « src/gpu/GrProcOptInfo.cpp ('k') | src/gpu/effects/GrPorterDuffXferProcessor.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 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) {
82 if (paint.getShader() || 82 if (paint.getShader() ||
83 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode) || 83 !SkXfermode::AsMode(paint.getXfermode(), nullptr) ||
84 paint.getMaskFilter() || 84 paint.getMaskFilter() ||
85 paint.getRasterizer() || 85 paint.getRasterizer() ||
86 paint.getColorFilter() || 86 paint.getColorFilter() ||
87 paint.getPathEffect() || 87 paint.getPathEffect() ||
88 paint.isFakeBoldText() || 88 paint.isFakeBoldText() ||
89 paint.getStyle() != SkPaint::kFill_Style) 89 paint.getStyle() != SkPaint::kFill_Style)
90 { 90 {
91 return true; 91 return true;
92 } 92 }
93 return false; 93 return false;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 if (cache->getAuxProcData(GlyphCacheAuxProc, &auxData)) { 271 if (cache->getAuxProcData(GlyphCacheAuxProc, &auxData)) {
272 scaler = (GrFontScaler*)auxData; 272 scaler = (GrFontScaler*)auxData;
273 } 273 }
274 if (nullptr == scaler) { 274 if (nullptr == scaler) {
275 scaler = new GrFontScaler(cache); 275 scaler = new GrFontScaler(cache);
276 cache->setAuxProc(GlyphCacheAuxProc, scaler); 276 cache->setAuxProc(GlyphCacheAuxProc, scaler);
277 } 277 }
278 278
279 return scaler; 279 return scaler;
280 } 280 }
OLDNEW
« no previous file with comments | « src/gpu/GrProcOptInfo.cpp ('k') | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698