| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ |
| 6 #define GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "gles2_impl_export.h" | 10 #include "gles2_impl_export.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 class GpuMemoryBufferFactory; | 24 class GpuMemoryBufferFactory; |
| 25 | 25 |
| 26 class GLES2_IMPL_EXPORT GLInProcessContext { | 26 class GLES2_IMPL_EXPORT GLInProcessContext { |
| 27 public: | 27 public: |
| 28 virtual ~GLInProcessContext() {} | 28 virtual ~GLInProcessContext() {} |
| 29 | 29 |
| 30 // Must be called before any GLInProcessContext instances are created. | 30 // Must be called before any GLInProcessContext instances are created. |
| 31 static void SetGpuMemoryBufferFactory(GpuMemoryBufferFactory* factory); | 31 static void SetGpuMemoryBufferFactory(GpuMemoryBufferFactory* factory); |
| 32 | 32 |
| 33 // Must be called before any GLInProcessContext instances are created. | |
| 34 // Default value is false. | |
| 35 static void EnableVirtualizedContext(); | |
| 36 | |
| 37 // GLInProcessContext configuration attributes. These are the same as used by | 33 // GLInProcessContext configuration attributes. These are the same as used by |
| 38 // EGL. Attributes are matched using a closest fit algorithm. | 34 // EGL. Attributes are matched using a closest fit algorithm. |
| 39 enum Attribute { | 35 enum Attribute { |
| 40 ALPHA_SIZE = 0x3021, | 36 ALPHA_SIZE = 0x3021, |
| 41 BLUE_SIZE = 0x3022, | 37 BLUE_SIZE = 0x3022, |
| 42 GREEN_SIZE = 0x3023, | 38 GREEN_SIZE = 0x3023, |
| 43 RED_SIZE = 0x3024, | 39 RED_SIZE = 0x3024, |
| 44 DEPTH_SIZE = 0x3025, | 40 DEPTH_SIZE = 0x3025, |
| 45 STENCIL_SIZE = 0x3026, | 41 STENCIL_SIZE = 0x3026, |
| 46 SAMPLES = 0x3031, | 42 SAMPLES = 0x3031, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 67 virtual void SignalQuery(unsigned query, const base::Closure& callback) = 0; | 63 virtual void SignalQuery(unsigned query, const base::Closure& callback) = 0; |
| 68 | 64 |
| 69 // Allows direct access to the GLES2 implementation so a GLInProcessContext | 65 // Allows direct access to the GLES2 implementation so a GLInProcessContext |
| 70 // can be used without making it current. | 66 // can be used without making it current. |
| 71 virtual gles2::GLES2Implementation* GetImplementation() = 0; | 67 virtual gles2::GLES2Implementation* GetImplementation() = 0; |
| 72 }; | 68 }; |
| 73 | 69 |
| 74 } // namespace gpu | 70 } // namespace gpu |
| 75 | 71 |
| 76 #endif // GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ | 72 #endif // GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ |
| OLD | NEW |