| OLD | NEW |
| 1 #ifndef DMGpuSupport_DEFINED | 1 #ifndef DMGpuSupport_DEFINED |
| 2 #define DMGpuSupport_DEFINED | 2 #define DMGpuSupport_DEFINED |
| 3 | 3 |
| 4 // Provides Ganesh to DM, | 4 // Provides Ganesh to DM, |
| 5 // or if it's not available, fakes it enough so most code doesn't have to know t
hat. | 5 // or if it's not available, fakes it enough so most code doesn't have to know t
hat. |
| 6 | 6 |
| 7 #include "SkSurface.h" | 7 #include "SkSurface.h" |
| 8 | 8 |
| 9 #if SK_SUPPORT_GPU | 9 #if SK_SUPPORT_GPU |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 #else// !SK_SUPPORT_GPU | 30 #else// !SK_SUPPORT_GPU |
| 31 | 31 |
| 32 // Ganesh is not available. Fake it. | 32 // Ganesh is not available. Fake it. |
| 33 | 33 |
| 34 enum GrGLStandard { | 34 enum GrGLStandard { |
| 35 kNone_GrGLStandard, | 35 kNone_GrGLStandard, |
| 36 kGL_GrGLStandard, | 36 kGL_GrGLStandard, |
| 37 kGLES_GrGLStandard | 37 kGLES_GrGLStandard |
| 38 }; | 38 }; |
| 39 static const int kGrGLStandardCnt = 3; |
| 39 | 40 |
| 40 class GrContextFactory { | 41 class GrContextFactory { |
| 41 public: | 42 public: |
| 42 typedef int GLContextType; | 43 typedef int GLContextType; |
| 43 | 44 |
| 44 static const GLContextType kANGLE_GLContextType = 0, | 45 static const GLContextType kANGLE_GLContextType = 0, |
| 45 kDebug_GLContextType = 0, | 46 kDebug_GLContextType = 0, |
| 46 kMESA_GLContextType = 0, | 47 kMESA_GLContextType = 0, |
| 47 kNVPR_GLContextType = 0, | 48 kNVPR_GLContextType = 0, |
| 48 kNative_GLContextType = 0, | 49 kNative_GLContextType = 0, |
| 49 kNull_GLContextType = 0; | 50 kNull_GLContextType = 0; |
| 51 static const int kGLContextTypeCnt = 1; |
| 50 void destroyContexts() {} | 52 void destroyContexts() {} |
| 51 | 53 |
| 52 void abandonContexts() {} | 54 void abandonContexts() {} |
| 53 }; | 55 }; |
| 54 | 56 |
| 55 namespace DM { | 57 namespace DM { |
| 56 | 58 |
| 57 static const bool kGPUDisabled = true; | 59 static const bool kGPUDisabled = true; |
| 58 | 60 |
| 59 static inline SkSurface* NewGpuSurface(GrContextFactory*, | 61 static inline SkSurface* NewGpuSurface(GrContextFactory*, |
| 60 GrContextFactory::GLContextType, | 62 GrContextFactory::GLContextType, |
| 61 GrGLStandard, | 63 GrGLStandard, |
| 62 SkImageInfo, | 64 SkImageInfo, |
| 63 int) { | 65 int) { |
| 64 return NULL; | 66 return NULL; |
| 65 } | 67 } |
| 66 | 68 |
| 67 } // namespace DM | 69 } // namespace DM |
| 68 | 70 |
| 69 #endif//SK_SUPPORT_GPU | 71 #endif//SK_SUPPORT_GPU |
| 70 | 72 |
| 71 #endif//DMGpuSupport_DEFINED | 73 #endif//DMGpuSupport_DEFINED |
| OLD | NEW |