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

Side by Side Diff: dm/DMGpuSupport.h

Issue 1322433006: Rename flag from "distance field" to "device independent." (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add legacy alias for chrome 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 | « bench/nanobench.cpp ('k') | dm/DMSrcSink.h » ('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 2014 Google Inc. 2 * Copyright 2014 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 #ifndef DMGpuSupport_DEFINED 8 #ifndef DMGpuSupport_DEFINED
9 #define DMGpuSupport_DEFINED 9 #define DMGpuSupport_DEFINED
10 10
(...skipping 11 matching lines...) Expand all
22 22
23 namespace DM { 23 namespace DM {
24 24
25 static const bool kGPUDisabled = false; 25 static const bool kGPUDisabled = false;
26 26
27 static inline SkSurface* NewGpuSurface(GrContextFactory* grFactory, 27 static inline SkSurface* NewGpuSurface(GrContextFactory* grFactory,
28 GrContextFactory::GLContextType type, 28 GrContextFactory::GLContextType type,
29 GrGLStandard gpuAPI, 29 GrGLStandard gpuAPI,
30 SkImageInfo info, 30 SkImageInfo info,
31 int samples, 31 int samples,
32 bool useDFText) { 32 bool useDIText) {
33 uint32_t flags = useDFText ? SkSurfaceProps::kUseDistanceFieldFonts_Flag : 0 ; 33 uint32_t flags = useDIText ? SkSurfaceProps::kUseDeviceIndependentFonts_Flag : 0;
34 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); 34 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
35 return SkSurface::NewRenderTarget(grFactory->get(type, gpuAPI), SkSurface::k No_Budgeted, 35 return SkSurface::NewRenderTarget(grFactory->get(type, gpuAPI), SkSurface::k No_Budgeted,
36 info, samples, &props); 36 info, samples, &props);
37 } 37 }
38 38
39 } // namespace DM 39 } // namespace DM
40 40
41 #else// !SK_SUPPORT_GPU 41 #else// !SK_SUPPORT_GPU
42 42
43 // Ganesh is not available. Fake it. 43 // Ganesh is not available. Fake it.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 int, 88 int,
89 bool) { 89 bool) {
90 return nullptr; 90 return nullptr;
91 } 91 }
92 92
93 } // namespace DM 93 } // namespace DM
94 94
95 #endif//SK_SUPPORT_GPU 95 #endif//SK_SUPPORT_GPU
96 96
97 #endif//DMGpuSupport_DEFINED 97 #endif//DMGpuSupport_DEFINED
OLDNEW
« no previous file with comments | « bench/nanobench.cpp ('k') | dm/DMSrcSink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698