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

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

Issue 1685653004: Move surface props off of GrTextContext (Closed) Base URL: https://skia.googlesource.com/skia.git@tc-cleanup-3
Patch Set: rebase Created 4 years, 10 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/text/GrTextContext.h ('k') | no next file » | 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 "GrFontScaler.h" 9 #include "GrFontScaler.h"
10 10
11 #include "SkGlyphCache.h" 11 #include "SkGlyphCache.h"
12 12
13 GrTextContext::GrTextContext(GrContext* context, const SkSurfaceProps& surfacePr ops) 13 GrTextContext::GrTextContext(GrContext* context)
14 : fContext(context) 14 : fContext(context) {
15 , fSurfaceProps(surfaceProps) {
16 } 15 }
17 16
18 bool GrTextContext::ShouldDisableLCD(const SkPaint& paint) { 17 bool GrTextContext::ShouldDisableLCD(const SkPaint& paint) {
19 if (!SkXfermode::AsMode(paint.getXfermode(), nullptr) || 18 if (!SkXfermode::AsMode(paint.getXfermode(), nullptr) ||
20 paint.getMaskFilter() || 19 paint.getMaskFilter() ||
21 paint.getRasterizer() || 20 paint.getRasterizer() ||
22 paint.getPathEffect() || 21 paint.getPathEffect() ||
23 paint.isFakeBoldText() || 22 paint.isFakeBoldText() ||
24 paint.getStyle() != SkPaint::kFill_Style) 23 paint.getStyle() != SkPaint::kFill_Style)
25 { 24 {
(...skipping 29 matching lines...) Expand all
55 if (cache->getAuxProcData(GlyphCacheAuxProc, &auxData)) { 54 if (cache->getAuxProcData(GlyphCacheAuxProc, &auxData)) {
56 scaler = (GrFontScaler*)auxData; 55 scaler = (GrFontScaler*)auxData;
57 } 56 }
58 if (nullptr == scaler) { 57 if (nullptr == scaler) {
59 scaler = new GrFontScaler(cache); 58 scaler = new GrFontScaler(cache);
60 cache->setAuxProc(GlyphCacheAuxProc, scaler); 59 cache->setAuxProc(GlyphCacheAuxProc, scaler);
61 } 60 }
62 61
63 return scaler; 62 return scaler;
64 } 63 }
OLDNEW
« no previous file with comments | « src/gpu/text/GrTextContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698