Chromium Code Reviews| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 virtual WGC3Denum getGraphicsResetStatusARB(); | 69 virtual WGC3Denum getGraphicsResetStatusARB(); |
| 70 | 70 |
| 71 ::gpu::ContextSupport* GetContextSupport(); | 71 ::gpu::ContextSupport* GetContextSupport(); |
| 72 | 72 |
| 73 ::gpu::gles2::GLES2Implementation* GetImplementation() { | 73 ::gpu::gles2::GLES2Implementation* GetImplementation() { |
| 74 return real_gl_; | 74 return real_gl_; |
| 75 } | 75 } |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 WebGraphicsContext3DInProcessCommandBufferImpl( | 78 WebGraphicsContext3DInProcessCommandBufferImpl( |
| 79 scoped_ptr< ::gpu::GLInProcessContext> context, | 79 scoped_ptr<::gpu::GLInProcessContext> context, |
| 80 const blink::WebGraphicsContext3D::Attributes& attributes, | 80 const blink::WebGraphicsContext3D::Attributes& attributes, |
| 81 bool lose_context_when_out_of_memory, | 81 bool lose_context_when_out_of_memory, |
| 82 bool is_offscreen, | 82 bool is_offscreen, |
| 83 gfx::AcceleratedWidget window); | 83 gfx::AcceleratedWidget window, |
| 84 ::gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | |
| 85 ::gpu::ImageFactory* image_factory); | |
|
no sievers
2014/10/17 21:16:50
Do we need these changes?
It's weird in the constr
reveman
2014/10/17 22:36:17
Right, this must have been confusing :) Removed th
| |
| 84 | 86 |
| 85 void OnContextLost(); | 87 void OnContextLost(); |
| 86 | 88 |
| 87 bool MaybeInitializeGL(); | 89 bool MaybeInitializeGL(); |
| 88 | 90 |
| 89 // Used to try to find bugs in code that calls gl directly through the gl api | 91 // Used to try to find bugs in code that calls gl directly through the gl api |
| 90 // instead of going through WebGraphicsContext3D. | 92 // instead of going through WebGraphicsContext3D. |
| 91 void ClearContext(); | 93 void ClearContext(); |
| 92 | 94 |
| 93 ::gpu::gles2::ContextCreationAttribHelper attribs_; | 95 ::gpu::gles2::ContextCreationAttribHelper attribs_; |
| 94 bool share_resources_; | 96 bool share_resources_; |
| 95 bool webgl_context_; | 97 bool webgl_context_; |
| 96 | 98 |
| 97 bool is_offscreen_; | 99 bool is_offscreen_; |
| 98 // Only used when not offscreen. | 100 // Only used when not offscreen. |
| 99 gfx::AcceleratedWidget window_; | 101 gfx::AcceleratedWidget window_; |
| 100 | 102 |
| 101 // The context we use for OpenGL rendering. | 103 // The context we use for OpenGL rendering. |
| 102 scoped_ptr< ::gpu::GLInProcessContext> context_; | 104 scoped_ptr< ::gpu::GLInProcessContext> context_; |
| 103 // The GLES2Implementation we use for OpenGL rendering. | 105 // The GLES2Implementation we use for OpenGL rendering. |
| 104 ::gpu::gles2::GLES2Implementation* real_gl_; | 106 ::gpu::gles2::GLES2Implementation* real_gl_; |
| 107 | |
| 108 ::gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | |
| 109 ::gpu::ImageFactory* image_factory_; | |
| 105 }; | 110 }; |
| 106 | 111 |
| 107 } // namespace gpu | 112 } // namespace gpu |
| 108 } // namespace webkit | 113 } // namespace webkit |
| 109 | 114 |
| 110 #endif // WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL _H_ | 115 #endif // WEBKIT_COMMON_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL _H_ |
| OLD | NEW |