| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #ifndef SKCOMMANDBUFFERGLCONTEXT_DEFINED | 8 #ifndef SKCOMMANDBUFFERGLCONTEXT_DEFINED |
| 9 #define SKCOMMANDBUFFERGLCONTEXT_DEFINED | 9 #define SKCOMMANDBUFFERGLCONTEXT_DEFINED |
| 10 | 10 |
| 11 #if SK_COMMAND_BUFFER | 11 #if SK_COMMAND_BUFFER |
| 12 | 12 |
| 13 #include "gl/SkGLContext.h" | 13 #include "gl/SkGLContext.h" |
| 14 | 14 |
| 15 class SkCommandBufferGLContext : public SkGLContext { | 15 class SkCommandBufferGLContext : public SkGLContext { |
| 16 public: | 16 public: |
| 17 ~SkCommandBufferGLContext() override; | 17 ~SkCommandBufferGLContext() override; |
| 18 | 18 |
| 19 static SkCommandBufferGLContext* Create() { | 19 static SkCommandBufferGLContext* Create(GrGLStandard forcedGpuAPI) { |
| 20 if (kGL_GrGLStandard == forcedGpuAPI) { |
| 21 return nullptr; |
| 22 } |
| 20 SkCommandBufferGLContext* ctx = new SkCommandBufferGLContext; | 23 SkCommandBufferGLContext* ctx = new SkCommandBufferGLContext; |
| 21 if (!ctx->isValid()) { | 24 if (!ctx->isValid()) { |
| 22 delete ctx; | 25 delete ctx; |
| 23 return nullptr; | 26 return nullptr; |
| 24 } | 27 } |
| 25 return ctx; | 28 return ctx; |
| 26 } | 29 } |
| 27 | 30 |
| 28 static SkCommandBufferGLContext* Create(void* nativeWindow, int msaaSampleCo
unt) { | 31 static SkCommandBufferGLContext* Create(void* nativeWindow, int msaaSampleCo
unt) { |
| 29 SkCommandBufferGLContext* ctx = new SkCommandBufferGLContext(nativeWindo
w, | 32 SkCommandBufferGLContext* ctx = new SkCommandBufferGLContext(nativeWindo
w, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 54 | 57 |
| 55 void* fContext; | 58 void* fContext; |
| 56 void* fDisplay; | 59 void* fDisplay; |
| 57 void* fSurface; | 60 void* fSurface; |
| 58 void* fConfig; | 61 void* fConfig; |
| 59 }; | 62 }; |
| 60 | 63 |
| 61 #endif // SK_COMMAND_BUFFER | 64 #endif // SK_COMMAND_BUFFER |
| 62 | 65 |
| 63 #endif | 66 #endif |
| OLD | NEW |