| 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 GPU_BLINK_WEBGRAPHICSCONTEXT3D_IMPL_H_ | 5 #ifndef GPU_BLINK_WEBGRAPHICSCONTEXT3D_IMPL_H_ |
| 6 #define GPU_BLINK_WEBGRAPHICSCONTEXT3D_IMPL_H_ | 6 #define GPU_BLINK_WEBGRAPHICSCONTEXT3D_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 //---------------------------------------------------------------------- | 37 //---------------------------------------------------------------------- |
| 38 // WebGraphicsContext3D methods | 38 // WebGraphicsContext3D methods |
| 39 | 39 |
| 40 void setContextLostCallback( | 40 void setContextLostCallback( |
| 41 WebGraphicsContext3D::WebGraphicsContextLostCallback* callback); | 41 WebGraphicsContext3D::WebGraphicsContextLostCallback* callback); |
| 42 | 42 |
| 43 void setErrorMessageCallback( | 43 void setErrorMessageCallback( |
| 44 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* callback) override; | 44 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* callback) override; |
| 45 | 45 |
| 46 // WebGraphicsContext3D implementation. | |
| 47 ::gpu::gles2::GLES2Interface* getGLES2Interface() override; | |
| 48 | |
| 49 ::gpu::gles2::GLES2Interface* GetGLInterface() { | 46 ::gpu::gles2::GLES2Interface* GetGLInterface() { |
| 50 return gl_; | 47 return gl_; |
| 51 } | 48 } |
| 52 | 49 |
| 53 // Convert WebGL context creation attributes into command buffer / EGL size | 50 // Convert WebGL context creation attributes into command buffer / EGL size |
| 54 // requests. | 51 // requests. |
| 55 static void ConvertAttributes( | 52 static void ConvertAttributes( |
| 56 const blink::WebGraphicsContext3D::Attributes& attributes, | 53 const blink::WebGraphicsContext3D::Attributes& attributes, |
| 57 ::gpu::gles2::ContextCreationAttribHelper* output_attribs); | 54 ::gpu::gles2::ContextCreationAttribHelper* output_attribs); |
| 58 | 55 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 80 // Errors raised by synthesizeGLError(). | 77 // Errors raised by synthesizeGLError(). |
| 81 std::vector<blink::WGC3Denum> synthetic_errors_; | 78 std::vector<blink::WGC3Denum> synthetic_errors_; |
| 82 | 79 |
| 83 ::gpu::gles2::GLES2Interface* gl_; | 80 ::gpu::gles2::GLES2Interface* gl_; |
| 84 bool lose_context_when_out_of_memory_; | 81 bool lose_context_when_out_of_memory_; |
| 85 }; | 82 }; |
| 86 | 83 |
| 87 } // namespace gpu_blink | 84 } // namespace gpu_blink |
| 88 | 85 |
| 89 #endif // GPU_BLINK_WEBGRAPHICSCONTEXT3D_IMPL_H_ | 86 #endif // GPU_BLINK_WEBGRAPHICSCONTEXT3D_IMPL_H_ |
| OLD | NEW |