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

Side by Side Diff: dm/DMGpuSupport.h

Issue 2188463002: Remove SkSurfaceProps gamma-correctness flag entirely. (Closed) Base URL: https://skia.googlesource.com/skia.git@remove-is-gamma-correct
Patch Set: Created 4 years, 4 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 | « no previous file | gm/dftext.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 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 18 matching lines...) Expand all
29 static const bool kGPUDisabled = false; 29 static const bool kGPUDisabled = false;
30 30
31 static inline sk_sp<SkSurface> NewGpuSurface( 31 static inline sk_sp<SkSurface> NewGpuSurface(
32 sk_gpu_test::GrContextFactory* grFactory, 32 sk_gpu_test::GrContextFactory* grFactory,
33 sk_gpu_test::GrContextFactory::ContextType type, 33 sk_gpu_test::GrContextFactory::ContextType type,
34 sk_gpu_test::GrContextFactory::ContextOptions options, 34 sk_gpu_test::GrContextFactory::ContextOptions options,
35 SkImageInfo info, 35 SkImageInfo info,
36 int samples, 36 int samples,
37 bool useDIText) { 37 bool useDIText) {
38 uint32_t flags = useDIText ? SkSurfaceProps::kUseDeviceIndependentFonts_Flag : 0; 38 uint32_t flags = useDIText ? SkSurfaceProps::kUseDeviceIndependentFonts_Flag : 0;
39 if (SkImageInfoIsGammaCorrect(info)) {
40 flags |= SkSurfaceProps::kGammaCorrect_Flag;
41 }
42 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); 39 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
43 return SkSurface::MakeRenderTarget(grFactory->get(type, options), SkBudgeted ::kNo, 40 return SkSurface::MakeRenderTarget(grFactory->get(type, options), SkBudgeted ::kNo,
44 info, samples, &props); 41 info, samples, &props);
45 } 42 }
46 43
47 } // namespace DM 44 } // namespace DM
48 45
49 #else// !SK_SUPPORT_GPU 46 #else// !SK_SUPPORT_GPU
50 47
51 // Ganesh is not available. Fake it. 48 // Ganesh is not available. Fake it.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 int, 103 int,
107 bool) { 104 bool) {
108 return nullptr; 105 return nullptr;
109 } 106 }
110 107
111 } // namespace DM 108 } // namespace DM
112 109
113 #endif//SK_SUPPORT_GPU 110 #endif//SK_SUPPORT_GPU
114 111
115 #endif//DMGpuSupport_DEFINED 112 #endif//DMGpuSupport_DEFINED
OLDNEW
« no previous file with comments | « no previous file | gm/dftext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698