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 #include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h" | 5 #include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h" |
6 | 6 |
7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
8 #include <utility> | 8 #include <utility> |
9 #ifndef GL_GLEXT_PROTOTYPES | 9 #ifndef GL_GLEXT_PROTOTYPES |
10 #define GL_GLEXT_PROTOTYPES 1 | 10 #define GL_GLEXT_PROTOTYPES 1 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 const gpu::gles2::ContextCreationAttribHelper& attributes, | 57 const gpu::gles2::ContextCreationAttribHelper& attributes, |
58 bool is_offscreen, | 58 bool is_offscreen, |
59 gfx::AcceleratedWidget window) | 59 gfx::AcceleratedWidget window) |
60 : attributes_(attributes), | 60 : attributes_(attributes), |
61 is_offscreen_(is_offscreen), | 61 is_offscreen_(is_offscreen), |
62 window_(window), | 62 window_(window), |
63 context_(std::move(context)) {} | 63 context_(std::move(context)) {} |
64 | 64 |
65 WebGraphicsContext3DInProcessCommandBufferImpl:: | 65 WebGraphicsContext3DInProcessCommandBufferImpl:: |
66 ~WebGraphicsContext3DInProcessCommandBufferImpl() { | 66 ~WebGraphicsContext3DInProcessCommandBufferImpl() { |
| 67 if (real_gl_) { |
| 68 real_gl_->SetErrorMessageCallback( |
| 69 base::Callback<void(const char*, int32_t)>()); |
| 70 real_gl_->SetLostContextCallback(base::Closure()); |
| 71 } |
67 } | 72 } |
68 | 73 |
69 size_t WebGraphicsContext3DInProcessCommandBufferImpl::GetMappedMemoryLimit() { | 74 size_t WebGraphicsContext3DInProcessCommandBufferImpl::GetMappedMemoryLimit() { |
70 return context_->GetMappedMemoryLimit(); | 75 return context_->GetMappedMemoryLimit(); |
71 } | 76 } |
72 | 77 |
73 bool WebGraphicsContext3DInProcessCommandBufferImpl::MaybeInitializeGL() { | 78 bool WebGraphicsContext3DInProcessCommandBufferImpl::MaybeInitializeGL() { |
74 if (initialized_) | 79 if (initialized_) |
75 return true; | 80 return true; |
76 | 81 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 void WebGraphicsContext3DInProcessCommandBufferImpl::SetLock(base::Lock* lock) { | 124 void WebGraphicsContext3DInProcessCommandBufferImpl::SetLock(base::Lock* lock) { |
120 context_->SetLock(lock); | 125 context_->SetLock(lock); |
121 } | 126 } |
122 | 127 |
123 ::gpu::ContextSupport* | 128 ::gpu::ContextSupport* |
124 WebGraphicsContext3DInProcessCommandBufferImpl::GetContextSupport() { | 129 WebGraphicsContext3DInProcessCommandBufferImpl::GetContextSupport() { |
125 return real_gl_; | 130 return real_gl_; |
126 } | 131 } |
127 | 132 |
128 } // namespace gpu_blink | 133 } // namespace gpu_blink |
OLD | NEW |