| 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_impl.h" | 5 #include "gpu/blink/webgraphicscontext3d_impl.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/atomicops.h" | 9 #include "base/atomicops.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 void WebGraphicsContext3DImpl::setErrorMessageCallback( | 76 void WebGraphicsContext3DImpl::setErrorMessageCallback( |
| 77 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* cb) { | 77 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* cb) { |
| 78 error_message_callback_ = cb; | 78 error_message_callback_ = cb; |
| 79 } | 79 } |
| 80 | 80 |
| 81 void WebGraphicsContext3DImpl::setContextLostCallback( | 81 void WebGraphicsContext3DImpl::setContextLostCallback( |
| 82 WebGraphicsContext3D::WebGraphicsContextLostCallback* cb) { | 82 WebGraphicsContext3D::WebGraphicsContextLostCallback* cb) { |
| 83 context_lost_callback_ = cb; | 83 context_lost_callback_ = cb; |
| 84 } | 84 } |
| 85 | 85 |
| 86 ::gpu::gles2::GLES2Interface* WebGraphicsContext3DImpl::getGLES2Interface() { | |
| 87 return gl_; | |
| 88 } | |
| 89 | |
| 90 ::gpu::gles2::GLES2ImplementationErrorMessageCallback* | 86 ::gpu::gles2::GLES2ImplementationErrorMessageCallback* |
| 91 WebGraphicsContext3DImpl::getErrorMessageCallback() { | 87 WebGraphicsContext3DImpl::getErrorMessageCallback() { |
| 92 if (!client_error_message_callback_) { | 88 if (!client_error_message_callback_) { |
| 93 client_error_message_callback_.reset( | 89 client_error_message_callback_.reset( |
| 94 new WebGraphicsContext3DErrorMessageCallback(this)); | 90 new WebGraphicsContext3DErrorMessageCallback(this)); |
| 95 } | 91 } |
| 96 return client_error_message_callback_.get(); | 92 return client_error_message_callback_.get(); |
| 97 } | 93 } |
| 98 | 94 |
| 99 void WebGraphicsContext3DImpl::OnErrorMessage( | 95 void WebGraphicsContext3DImpl::OnErrorMessage( |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2; | 137 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2; |
| 142 break; | 138 break; |
| 143 default: | 139 default: |
| 144 NOTREACHED(); | 140 NOTREACHED(); |
| 145 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2; | 141 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2; |
| 146 break; | 142 break; |
| 147 } | 143 } |
| 148 } | 144 } |
| 149 | 145 |
| 150 } // namespace gpu_blink | 146 } // namespace gpu_blink |
| OLD | NEW |