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