| 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 |
| 11 // Provides Ganesh to DM, | 11 // Provides Ganesh to DM, |
| 12 // or if it's not available, fakes it enough so most code doesn't have to know t
hat. | 12 // or if it's not available, fakes it enough so most code doesn't have to know t
hat. |
| 13 | 13 |
| 14 #include "SkSurface.h" | 14 #include "SkSurface.h" |
| 15 | 15 |
| 16 // This should be safe to include even in no-gpu builds. Include by relative pat
h so it |
| 17 // can be found in non-gpu builds. |
| 18 #include "../include/gpu/GrContextOptions.h" |
| 19 |
| 16 #if SK_SUPPORT_GPU | 20 #if SK_SUPPORT_GPU |
| 17 | 21 |
| 18 // Ganesh is available. Yippee! | 22 // Ganesh is available. Yippee! |
| 19 | 23 |
| 20 # include "GrContext.h" | 24 # include "GrContext.h" |
| 21 # include "GrContextFactory.h" | 25 # include "GrContextFactory.h" |
| 22 | 26 |
| 23 namespace DM { | 27 namespace DM { |
| 24 | 28 |
| 25 static const bool kGPUDisabled = false; | 29 static const bool kGPUDisabled = false; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 48 kGLES_GrGLStandard | 52 kGLES_GrGLStandard |
| 49 }; | 53 }; |
| 50 static const int kGrGLStandardCnt = 3; | 54 static const int kGrGLStandardCnt = 3; |
| 51 | 55 |
| 52 class GrContext { | 56 class GrContext { |
| 53 public: | 57 public: |
| 54 void dumpCacheStats(SkString*) const {} | 58 void dumpCacheStats(SkString*) const {} |
| 55 void dumpGpuStats(SkString*) const {} | 59 void dumpGpuStats(SkString*) const {} |
| 56 }; | 60 }; |
| 57 | 61 |
| 58 struct GrContextOptions { | |
| 59 bool fImmediateMode; | |
| 60 bool fClipBatchToBounds; | |
| 61 }; | |
| 62 | |
| 63 class GrContextFactory { | 62 class GrContextFactory { |
| 64 public: | 63 public: |
| 65 GrContextFactory() {}; | 64 GrContextFactory() {}; |
| 66 explicit GrContextFactory(const GrContextOptions&) {} | 65 explicit GrContextFactory(const GrContextOptions&) {} |
| 67 | 66 |
| 68 typedef int GLContextType; | 67 typedef int GLContextType; |
| 69 | 68 |
| 70 static const GLContextType kANGLE_GLContextType = 0, | 69 static const GLContextType kANGLE_GLContextType = 0, |
| 71 kANGLE_GL_GLContextType = 0, | 70 kANGLE_GL_GLContextType = 0, |
| 72 kCommandBuffer_GLContextType = 0, | 71 kCommandBuffer_GLContextType = 0, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 92 int, | 91 int, |
| 93 bool) { | 92 bool) { |
| 94 return nullptr; | 93 return nullptr; |
| 95 } | 94 } |
| 96 | 95 |
| 97 } // namespace DM | 96 } // namespace DM |
| 98 | 97 |
| 99 #endif//SK_SUPPORT_GPU | 98 #endif//SK_SUPPORT_GPU |
| 100 | 99 |
| 101 #endif//DMGpuSupport_DEFINED | 100 #endif//DMGpuSupport_DEFINED |
| OLD | NEW |