OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |