| 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 WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ | 5 #ifndef WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ |
| 6 #define WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ | 6 #define WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 namespace gpu { | 29 namespace gpu { |
| 30 class GLInProcessContext; | 30 class GLInProcessContext; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace webkit { | 33 namespace webkit { |
| 34 namespace gpu { | 34 namespace gpu { |
| 35 | 35 |
| 36 class WEBKIT_GPU_EXPORT WebGraphicsContext3DInProcessCommandBufferImpl | 36 class WEBKIT_GPU_EXPORT WebGraphicsContext3DInProcessCommandBufferImpl |
| 37 : public WebGraphicsContext3DImpl { | 37 : public WebGraphicsContext3DImpl { |
| 38 public: | 38 public: |
| 39 enum MappedMemoryReclaimLimit { |
| 40 kNoLimit = 0, |
| 41 }; |
| 42 |
| 39 static scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> | 43 static scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> |
| 40 CreateViewContext( | 44 CreateViewContext( |
| 41 const blink::WebGraphicsContext3D::Attributes& attributes, | 45 const blink::WebGraphicsContext3D::Attributes& attributes, |
| 42 bool lose_context_when_out_of_memory, | 46 bool lose_context_when_out_of_memory, |
| 43 gfx::AcceleratedWidget window); | 47 gfx::AcceleratedWidget window); |
| 44 | 48 |
| 45 static scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> | 49 static scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> |
| 46 CreateOffscreenContext( | 50 CreateOffscreenContext( |
| 47 const blink::WebGraphicsContext3D::Attributes& attributes, | 51 const blink::WebGraphicsContext3D::Attributes& attributes, |
| 48 bool lose_context_when_out_of_memory); | 52 bool lose_context_when_out_of_memory); |
| 49 | 53 |
| 50 static scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> | 54 static scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> |
| 51 WrapContext( | 55 WrapContext( |
| 52 scoped_ptr< ::gpu::GLInProcessContext> context, | 56 scoped_ptr< ::gpu::GLInProcessContext> context, |
| 53 const blink::WebGraphicsContext3D::Attributes& attributes); | 57 const blink::WebGraphicsContext3D::Attributes& attributes); |
| 54 | 58 |
| 55 virtual ~WebGraphicsContext3DInProcessCommandBufferImpl(); | 59 virtual ~WebGraphicsContext3DInProcessCommandBufferImpl(); |
| 56 | 60 |
| 61 size_t GetMappedMemoryLimit(); |
| 62 |
| 57 //---------------------------------------------------------------------- | 63 //---------------------------------------------------------------------- |
| 58 // WebGraphicsContext3D methods | 64 // WebGraphicsContext3D methods |
| 59 virtual bool makeContextCurrent(); | 65 virtual bool makeContextCurrent(); |
| 60 | 66 |
| 61 virtual bool isContextLost(); | 67 virtual bool isContextLost(); |
| 62 | 68 |
| 63 virtual WGC3Denum getGraphicsResetStatusARB(); | 69 virtual WGC3Denum getGraphicsResetStatusARB(); |
| 64 | 70 |
| 65 ::gpu::ContextSupport* GetContextSupport(); | 71 ::gpu::ContextSupport* GetContextSupport(); |
| 66 | 72 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 95 // The context we use for OpenGL rendering. | 101 // The context we use for OpenGL rendering. |
| 96 scoped_ptr< ::gpu::GLInProcessContext> context_; | 102 scoped_ptr< ::gpu::GLInProcessContext> context_; |
| 97 // The GLES2Implementation we use for OpenGL rendering. | 103 // The GLES2Implementation we use for OpenGL rendering. |
| 98 ::gpu::gles2::GLES2Implementation* real_gl_; | 104 ::gpu::gles2::GLES2Implementation* real_gl_; |
| 99 }; | 105 }; |
| 100 | 106 |
| 101 } // namespace gpu | 107 } // namespace gpu |
| 102 } // namespace webkit | 108 } // namespace webkit |
| 103 | 109 |
| 104 #endif // WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL
_H_ | 110 #endif // WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL
_H_ |
| OLD | NEW |