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 } | |
72 } | 67 } |
73 | 68 |
74 size_t WebGraphicsContext3DInProcessCommandBufferImpl::GetMappedMemoryLimit() { | 69 size_t WebGraphicsContext3DInProcessCommandBufferImpl::GetMappedMemoryLimit() { |
75 return context_->GetMappedMemoryLimit(); | 70 return context_->GetMappedMemoryLimit(); |
76 } | 71 } |
77 | 72 |
78 bool WebGraphicsContext3DInProcessCommandBufferImpl::MaybeInitializeGL() { | 73 bool WebGraphicsContext3DInProcessCommandBufferImpl::MaybeInitializeGL() { |
79 if (initialized_) | 74 if (initialized_) |
80 return true; | 75 return true; |
81 | 76 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 void WebGraphicsContext3DInProcessCommandBufferImpl::SetLock(base::Lock* lock) { | 119 void WebGraphicsContext3DInProcessCommandBufferImpl::SetLock(base::Lock* lock) { |
125 context_->SetLock(lock); | 120 context_->SetLock(lock); |
126 } | 121 } |
127 | 122 |
128 ::gpu::ContextSupport* | 123 ::gpu::ContextSupport* |
129 WebGraphicsContext3DInProcessCommandBufferImpl::GetContextSupport() { | 124 WebGraphicsContext3DInProcessCommandBufferImpl::GetContextSupport() { |
130 return real_gl_; | 125 return real_gl_; |
131 } | 126 } |
132 | 127 |
133 } // namespace gpu_blink | 128 } // namespace gpu_blink |
OLD | NEW |