| 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 18 matching lines...) Expand all Loading... |
| 29 static const bool kGPUDisabled = false; | 29 static const bool kGPUDisabled = false; |
| 30 | 30 |
| 31 static inline SkSurface* NewGpuSurface(GrContextFactory* grFactory, | 31 static inline SkSurface* NewGpuSurface(GrContextFactory* grFactory, |
| 32 GrContextFactory::GLContextType type, | 32 GrContextFactory::GLContextType type, |
| 33 GrContextFactory::GLContextOptions option
s, | 33 GrContextFactory::GLContextOptions option
s, |
| 34 SkImageInfo info, | 34 SkImageInfo info, |
| 35 int samples, | 35 int samples, |
| 36 bool useDIText) { | 36 bool useDIText) { |
| 37 uint32_t flags = useDIText ? SkSurfaceProps::kUseDeviceIndependentFonts_Flag
: 0; | 37 uint32_t flags = useDIText ? SkSurfaceProps::kUseDeviceIndependentFonts_Flag
: 0; |
| 38 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); | 38 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); |
| 39 return SkSurface::NewRenderTarget(grFactory->get(type, options), SkBudgeted:
:kNo, | 39 return SkSurface::NewRenderTarget(grFactory->get(type, options), SkSurface::
kNo_Budgeted, |
| 40 info, samples, &props); | 40 info, samples, &props); |
| 41 } | 41 } |
| 42 | 42 |
| 43 } // namespace DM | 43 } // namespace DM |
| 44 | 44 |
| 45 #else// !SK_SUPPORT_GPU | 45 #else// !SK_SUPPORT_GPU |
| 46 | 46 |
| 47 // Ganesh is not available. Fake it. | 47 // Ganesh is not available. Fake it. |
| 48 | 48 |
| 49 enum GrGLStandard { | 49 enum GrGLStandard { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 int, | 95 int, |
| 96 bool) { | 96 bool) { |
| 97 return nullptr; | 97 return nullptr; |
| 98 } | 98 } |
| 99 | 99 |
| 100 } // namespace DM | 100 } // namespace DM |
| 101 | 101 |
| 102 #endif//SK_SUPPORT_GPU | 102 #endif//SK_SUPPORT_GPU |
| 103 | 103 |
| 104 #endif//DMGpuSupport_DEFINED | 104 #endif//DMGpuSupport_DEFINED |
| OLD | NEW |