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 CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // WebGraphicsContext3D methods | 111 // WebGraphicsContext3D methods |
112 | 112 |
113 // Must be called after initialize() and before any of the following methods. | 113 // Must be called after initialize() and before any of the following methods. |
114 // Permanently binds to the first calling thread. Returns false if the | 114 // Permanently binds to the first calling thread. Returns false if the |
115 // graphics context fails to create. Do not call from more than one thread. | 115 // graphics context fails to create. Do not call from more than one thread. |
116 virtual bool makeContextCurrent(); | 116 virtual bool makeContextCurrent(); |
117 | 117 |
118 virtual int width(); | 118 virtual int width(); |
119 virtual int height(); | 119 virtual int height(); |
120 | 120 |
121 virtual bool isGLES2Compliant(); | |
122 | |
123 virtual bool setParentContext(WebGraphicsContext3D* parent_context); | 121 virtual bool setParentContext(WebGraphicsContext3D* parent_context); |
124 | 122 |
125 virtual unsigned int insertSyncPoint(); | 123 virtual unsigned int insertSyncPoint(); |
126 virtual void waitSyncPoint(unsigned int sync_point); | 124 virtual void waitSyncPoint(unsigned int sync_point); |
127 virtual void signalSyncPoint(unsigned sync_point, | 125 virtual void signalSyncPoint(unsigned sync_point, |
128 WebGraphicsSyncPointCallback* callback); | 126 WebGraphicsSyncPointCallback* callback); |
129 | 127 |
130 virtual void reshape(int width, int height); | 128 virtual void reshape(int width, int height); |
131 virtual void reshapeWithScaleFactor( | 129 virtual void reshapeWithScaleFactor( |
132 int width, int height, float scale_factor); | 130 int width, int height, float scale_factor); |
133 | 131 |
134 virtual bool readBackFramebuffer(unsigned char* pixels, size_t buffer_size); | 132 virtual bool readBackFramebuffer(unsigned char* pixels, size_t buffer_size); |
135 virtual bool readBackFramebuffer(unsigned char* pixels, size_t buffer_size, | 133 virtual bool readBackFramebuffer(unsigned char* pixels, size_t buffer_size, |
136 WebGLId framebuffer, int width, int height); | 134 WebGLId framebuffer, int width, int height); |
137 | 135 |
138 virtual WebGLId getPlatformTextureId(); | |
139 virtual void prepareTexture(); | 136 virtual void prepareTexture(); |
140 virtual void postSubBufferCHROMIUM(int x, int y, int width, int height); | 137 virtual void postSubBufferCHROMIUM(int x, int y, int width, int height); |
141 | 138 |
142 virtual void activeTexture(WGC3Denum texture); | 139 virtual void activeTexture(WGC3Denum texture); |
143 virtual void attachShader(WebGLId program, WebGLId shader); | 140 virtual void attachShader(WebGLId program, WebGLId shader); |
144 virtual void bindAttribLocation(WebGLId program, WGC3Duint index, | 141 virtual void bindAttribLocation(WebGLId program, WGC3Duint index, |
145 const WGC3Dchar* name); | 142 const WGC3Dchar* name); |
146 virtual void bindBuffer(WGC3Denum target, WebGLId buffer); | 143 virtual void bindBuffer(WGC3Denum target, WebGLId buffer); |
147 virtual void bindFramebuffer(WGC3Denum target, WebGLId framebuffer); | 144 virtual void bindFramebuffer(WGC3Denum target, WebGLId framebuffer); |
148 virtual void bindRenderbuffer(WGC3Denum target, WebGLId renderbuffer); | 145 virtual void bindRenderbuffer(WGC3Denum target, WebGLId renderbuffer); |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 gpu::gles2::GLES2Interface* trace_gl_; | 738 gpu::gles2::GLES2Interface* trace_gl_; |
742 Error last_error_; | 739 Error last_error_; |
743 int frame_number_; | 740 int frame_number_; |
744 bool bind_generates_resources_; | 741 bool bind_generates_resources_; |
745 bool use_echo_for_swap_ack_; | 742 bool use_echo_for_swap_ack_; |
746 }; | 743 }; |
747 | 744 |
748 } // namespace content | 745 } // namespace content |
749 | 746 |
750 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 747 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
OLD | NEW |