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

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

Issue 1686143003: Remove GrContext* from GrTextContext (Closed) Base URL: https://skia.googlesource.com/skia.git@tc-cleanup-5-movecontext
Patch Set: cleanup 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)
14 : fContext(context) {
15 }
16
17 bool GrTextContext::ShouldDisableLCD(const SkPaint& paint) { 13 bool GrTextContext::ShouldDisableLCD(const SkPaint& paint) {
18 if (!SkXfermode::AsMode(paint.getXfermode(), nullptr) || 14 if (!SkXfermode::AsMode(paint.getXfermode(), nullptr) ||
19 paint.getMaskFilter() || 15 paint.getMaskFilter() ||
20 paint.getRasterizer() || 16 paint.getRasterizer() ||
21 paint.getPathEffect() || 17 paint.getPathEffect() ||
22 paint.isFakeBoldText() || 18 paint.isFakeBoldText() ||
23 paint.getStyle() != SkPaint::kFill_Style) 19 paint.getStyle() != SkPaint::kFill_Style)
24 { 20 {
25 return true; 21 return true;
26 } 22 }
(...skipping 27 matching lines...) Expand all
54 if (cache->getAuxProcData(GlyphCacheAuxProc, &auxData)) { 50 if (cache->getAuxProcData(GlyphCacheAuxProc, &auxData)) {
55 scaler = (GrFontScaler*)auxData; 51 scaler = (GrFontScaler*)auxData;
56 } 52 }
57 if (nullptr == scaler) { 53 if (nullptr == scaler) {
58 scaler = new GrFontScaler(cache); 54 scaler = new GrFontScaler(cache);
59 cache->setAuxProc(GlyphCacheAuxProc, scaler); 55 cache->setAuxProc(GlyphCacheAuxProc, scaler);
60 } 56 }
61 57
62 return scaler; 58 return scaler;
63 } 59 }
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