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 12 matching lines...) Expand all Loading... |
23 #define GL_GLEXT_PROTOTYPES 1 | 23 #define GL_GLEXT_PROTOTYPES 1 |
24 #endif | 24 #endif |
25 #include "third_party/khronos/GLES2/gl2ext.h" | 25 #include "third_party/khronos/GLES2/gl2ext.h" |
26 | 26 |
27 namespace gpu_blink { | 27 namespace gpu_blink { |
28 | 28 |
29 WebGraphicsContext3DImpl::WebGraphicsContext3DImpl() | 29 WebGraphicsContext3DImpl::WebGraphicsContext3DImpl() |
30 : initialized_(false), | 30 : initialized_(false), |
31 initialize_failed_(false), | 31 initialize_failed_(false), |
32 context_lost_callback_(0), | 32 context_lost_callback_(0), |
33 error_message_callback_(0), | |
34 gl_(NULL) {} | 33 gl_(NULL) {} |
35 | 34 |
36 WebGraphicsContext3DImpl::~WebGraphicsContext3DImpl() { | 35 WebGraphicsContext3DImpl::~WebGraphicsContext3DImpl() { |
37 | 36 |
38 } | 37 } |
39 | 38 |
40 void WebGraphicsContext3DImpl::setErrorMessageCallback( | |
41 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* cb) { | |
42 error_message_callback_ = cb; | |
43 } | |
44 | |
45 void WebGraphicsContext3DImpl::setContextLostCallback( | 39 void WebGraphicsContext3DImpl::setContextLostCallback( |
46 WebGraphicsContext3D::WebGraphicsContextLostCallback* cb) { | 40 WebGraphicsContext3D::WebGraphicsContextLostCallback* cb) { |
47 context_lost_callback_ = cb; | 41 context_lost_callback_ = cb; |
48 } | 42 } |
49 | 43 |
50 } // namespace gpu_blink | 44 } // namespace gpu_blink |
OLD | NEW |