| 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 13 matching lines...) Expand all Loading... |
| 24 class GpuMemoryBuffer; | 24 class GpuMemoryBuffer; |
| 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 typedef scoped_ptr< ::gpu::GpuMemoryBuffer> GpuMemoryBufferCreator( | 30 typedef scoped_ptr< ::gpu::GpuMemoryBuffer> GpuMemoryBufferCreator( |
| 31 int width, int height); | 31 int width, int height); |
| 32 static void SetGpuMemoryBufferCreator(GpuMemoryBufferCreator* creator); | 32 static void SetGpuMemoryBufferCreator(GpuMemoryBufferCreator* creator); |
| 33 | 33 |
| 34 // Must be called before any GLInProcessContext instances are created. | |
| 35 // Default value is false. | |
| 36 static void EnableVirtualizedContext(); | |
| 37 | |
| 38 // GLInProcessContext configuration attributes. These are the same as used by | 34 // GLInProcessContext configuration attributes. These are the same as used by |
| 39 // EGL. Attributes are matched using a closest fit algorithm. | 35 // EGL. Attributes are matched using a closest fit algorithm. |
| 40 enum Attribute { | 36 enum Attribute { |
| 41 ALPHA_SIZE = 0x3021, | 37 ALPHA_SIZE = 0x3021, |
| 42 BLUE_SIZE = 0x3022, | 38 BLUE_SIZE = 0x3022, |
| 43 GREEN_SIZE = 0x3023, | 39 GREEN_SIZE = 0x3023, |
| 44 RED_SIZE = 0x3024, | 40 RED_SIZE = 0x3024, |
| 45 DEPTH_SIZE = 0x3025, | 41 DEPTH_SIZE = 0x3025, |
| 46 STENCIL_SIZE = 0x3026, | 42 STENCIL_SIZE = 0x3026, |
| 47 SAMPLES = 0x3031, | 43 SAMPLES = 0x3031, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 68 virtual void SignalQuery(unsigned query, const base::Closure& callback) = 0; | 64 virtual void SignalQuery(unsigned query, const base::Closure& callback) = 0; |
| 69 | 65 |
| 70 // Allows direct access to the GLES2 implementation so a GLInProcessContext | 66 // Allows direct access to the GLES2 implementation so a GLInProcessContext |
| 71 // can be used without making it current. | 67 // can be used without making it current. |
| 72 virtual gles2::GLES2Implementation* GetImplementation() = 0; | 68 virtual gles2::GLES2Implementation* GetImplementation() = 0; |
| 73 }; | 69 }; |
| 74 | 70 |
| 75 } // namespace gpu | 71 } // namespace gpu |
| 76 | 72 |
| 77 #endif // GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ | 73 #endif // GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ |
| OLD | NEW |