| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 5 #ifndef CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
| 6 #define CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 6 #define CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 virtual ~TestWebGraphicsContext3D(); | 32 virtual ~TestWebGraphicsContext3D(); |
| 33 | 33 |
| 34 virtual bool makeContextCurrent(); | 34 virtual bool makeContextCurrent(); |
| 35 | 35 |
| 36 virtual void reshapeWithScaleFactor( | 36 virtual void reshapeWithScaleFactor( |
| 37 int width, int height, float scale_factor); | 37 int width, int height, float scale_factor); |
| 38 | 38 |
| 39 virtual bool isContextLost(); | 39 virtual bool isContextLost(); |
| 40 | 40 |
| 41 virtual void attachShader(WebKit::WebGLId program, WebKit::WebGLId shader); | 41 virtual void attachShader(blink::WebGLId program, blink::WebGLId shader); |
| 42 virtual void bindFramebuffer( | 42 virtual void bindFramebuffer( |
| 43 WebKit::WGC3Denum target, WebKit::WebGLId framebuffer); | 43 blink::WGC3Denum target, blink::WebGLId framebuffer); |
| 44 virtual void bindRenderbuffer( | 44 virtual void bindRenderbuffer( |
| 45 WebKit::WGC3Denum target, WebKit::WebGLId renderbuffer); | 45 blink::WGC3Denum target, blink::WebGLId renderbuffer); |
| 46 virtual void bindTexture( | 46 virtual void bindTexture( |
| 47 WebKit::WGC3Denum target, | 47 blink::WGC3Denum target, |
| 48 WebKit::WebGLId texture_id); | 48 blink::WebGLId texture_id); |
| 49 | 49 |
| 50 virtual WebKit::WGC3Denum checkFramebufferStatus(WebKit::WGC3Denum target); | 50 virtual blink::WGC3Denum checkFramebufferStatus(blink::WGC3Denum target); |
| 51 | 51 |
| 52 virtual Attributes getContextAttributes(); | 52 virtual Attributes getContextAttributes(); |
| 53 | 53 |
| 54 virtual WebKit::WebString getString(WebKit::WGC3Denum name); | 54 virtual blink::WebString getString(blink::WGC3Denum name); |
| 55 virtual WebKit::WGC3Dint getUniformLocation( | 55 virtual blink::WGC3Dint getUniformLocation( |
| 56 WebKit::WebGLId program, | 56 blink::WebGLId program, |
| 57 const WebKit::WGC3Dchar* name); | 57 const blink::WGC3Dchar* name); |
| 58 virtual WebKit::WGC3Dsizeiptr getVertexAttribOffset( | 58 virtual blink::WGC3Dsizeiptr getVertexAttribOffset( |
| 59 WebKit::WGC3Duint index, | 59 blink::WGC3Duint index, |
| 60 WebKit::WGC3Denum pname); | 60 blink::WGC3Denum pname); |
| 61 | 61 |
| 62 virtual WebKit::WGC3Dboolean isBuffer(WebKit::WebGLId buffer); | 62 virtual blink::WGC3Dboolean isBuffer(blink::WebGLId buffer); |
| 63 virtual WebKit::WGC3Dboolean isEnabled(WebKit::WGC3Denum cap); | 63 virtual blink::WGC3Dboolean isEnabled(blink::WGC3Denum cap); |
| 64 virtual WebKit::WGC3Dboolean isFramebuffer(WebKit::WebGLId framebuffer); | 64 virtual blink::WGC3Dboolean isFramebuffer(blink::WebGLId framebuffer); |
| 65 virtual WebKit::WGC3Dboolean isProgram(WebKit::WebGLId program); | 65 virtual blink::WGC3Dboolean isProgram(blink::WebGLId program); |
| 66 virtual WebKit::WGC3Dboolean isRenderbuffer(WebKit::WebGLId renderbuffer); | 66 virtual blink::WGC3Dboolean isRenderbuffer(blink::WebGLId renderbuffer); |
| 67 virtual WebKit::WGC3Dboolean isShader(WebKit::WebGLId shader); | 67 virtual blink::WGC3Dboolean isShader(blink::WebGLId shader); |
| 68 virtual WebKit::WGC3Dboolean isTexture(WebKit::WebGLId texture); | 68 virtual blink::WGC3Dboolean isTexture(blink::WebGLId texture); |
| 69 | 69 |
| 70 virtual void useProgram(WebKit::WebGLId program); | 70 virtual void useProgram(blink::WebGLId program); |
| 71 | 71 |
| 72 virtual void genBuffers(WebKit::WGC3Dsizei count, WebKit::WebGLId* ids); | 72 virtual void genBuffers(blink::WGC3Dsizei count, blink::WebGLId* ids); |
| 73 virtual void genFramebuffers(WebKit::WGC3Dsizei count, WebKit::WebGLId* ids); | 73 virtual void genFramebuffers(blink::WGC3Dsizei count, blink::WebGLId* ids); |
| 74 virtual void genRenderbuffers(WebKit::WGC3Dsizei count, WebKit::WebGLId* ids); | 74 virtual void genRenderbuffers(blink::WGC3Dsizei count, blink::WebGLId* ids); |
| 75 virtual void genTextures(WebKit::WGC3Dsizei count, WebKit::WebGLId* ids); | 75 virtual void genTextures(blink::WGC3Dsizei count, blink::WebGLId* ids); |
| 76 | 76 |
| 77 virtual void deleteBuffers(WebKit::WGC3Dsizei count, WebKit::WebGLId* ids); | 77 virtual void deleteBuffers(blink::WGC3Dsizei count, blink::WebGLId* ids); |
| 78 virtual void deleteFramebuffers( | 78 virtual void deleteFramebuffers( |
| 79 WebKit::WGC3Dsizei count, WebKit::WebGLId* ids); | 79 blink::WGC3Dsizei count, blink::WebGLId* ids); |
| 80 virtual void deleteRenderbuffers( | 80 virtual void deleteRenderbuffers( |
| 81 WebKit::WGC3Dsizei count, WebKit::WebGLId* ids); | 81 blink::WGC3Dsizei count, blink::WebGLId* ids); |
| 82 virtual void deleteTextures(WebKit::WGC3Dsizei count, WebKit::WebGLId* ids); | 82 virtual void deleteTextures(blink::WGC3Dsizei count, blink::WebGLId* ids); |
| 83 | 83 |
| 84 virtual WebKit::WebGLId createBuffer(); | 84 virtual blink::WebGLId createBuffer(); |
| 85 virtual WebKit::WebGLId createFramebuffer(); | 85 virtual blink::WebGLId createFramebuffer(); |
| 86 virtual WebKit::WebGLId createRenderbuffer(); | 86 virtual blink::WebGLId createRenderbuffer(); |
| 87 virtual WebKit::WebGLId createTexture(); | 87 virtual blink::WebGLId createTexture(); |
| 88 | 88 |
| 89 virtual void deleteBuffer(WebKit::WebGLId id); | 89 virtual void deleteBuffer(blink::WebGLId id); |
| 90 virtual void deleteFramebuffer(WebKit::WebGLId id); | 90 virtual void deleteFramebuffer(blink::WebGLId id); |
| 91 virtual void deleteRenderbuffer(WebKit::WebGLId id); | 91 virtual void deleteRenderbuffer(blink::WebGLId id); |
| 92 virtual void deleteTexture(WebKit::WebGLId id); | 92 virtual void deleteTexture(blink::WebGLId id); |
| 93 | 93 |
| 94 virtual WebKit::WebGLId createProgram(); | 94 virtual blink::WebGLId createProgram(); |
| 95 virtual WebKit::WebGLId createShader(WebKit::WGC3Denum); | 95 virtual blink::WebGLId createShader(blink::WGC3Denum); |
| 96 virtual WebKit::WebGLId createExternalTexture(); | 96 virtual blink::WebGLId createExternalTexture(); |
| 97 | 97 |
| 98 virtual void deleteProgram(WebKit::WebGLId id); | 98 virtual void deleteProgram(blink::WebGLId id); |
| 99 virtual void deleteShader(WebKit::WebGLId id); | 99 virtual void deleteShader(blink::WebGLId id); |
| 100 | 100 |
| 101 virtual void endQueryEXT(WebKit::WGC3Denum target); | 101 virtual void endQueryEXT(blink::WGC3Denum target); |
| 102 virtual void getQueryObjectuivEXT( | 102 virtual void getQueryObjectuivEXT( |
| 103 WebKit::WebGLId query, | 103 blink::WebGLId query, |
| 104 WebKit::WGC3Denum pname, | 104 blink::WGC3Denum pname, |
| 105 WebKit::WGC3Duint* params); | 105 blink::WGC3Duint* params); |
| 106 | 106 |
| 107 virtual void getIntegerv( | 107 virtual void getIntegerv( |
| 108 WebKit::WGC3Denum pname, | 108 blink::WGC3Denum pname, |
| 109 WebKit::WGC3Dint* value); | 109 blink::WGC3Dint* value); |
| 110 | 110 |
| 111 virtual void genMailboxCHROMIUM(WebKit::WGC3Dbyte* mailbox); | 111 virtual void genMailboxCHROMIUM(blink::WGC3Dbyte* mailbox); |
| 112 virtual void produceTextureCHROMIUM(WebKit::WGC3Denum target, | 112 virtual void produceTextureCHROMIUM(blink::WGC3Denum target, |
| 113 const WebKit::WGC3Dbyte* mailbox) { } | 113 const blink::WGC3Dbyte* mailbox) { } |
| 114 virtual void consumeTextureCHROMIUM(WebKit::WGC3Denum target, | 114 virtual void consumeTextureCHROMIUM(blink::WGC3Denum target, |
| 115 const WebKit::WGC3Dbyte* mailbox) { } | 115 const blink::WGC3Dbyte* mailbox) { } |
| 116 | 116 |
| 117 virtual void setContextLostCallback( | 117 virtual void setContextLostCallback( |
| 118 WebGraphicsContextLostCallback* callback); | 118 WebGraphicsContextLostCallback* callback); |
| 119 | 119 |
| 120 virtual void loseContextCHROMIUM(WebKit::WGC3Denum current, | 120 virtual void loseContextCHROMIUM(blink::WGC3Denum current, |
| 121 WebKit::WGC3Denum other); | 121 blink::WGC3Denum other); |
| 122 | 122 |
| 123 virtual void setSwapBuffersCompleteCallbackCHROMIUM( | 123 virtual void setSwapBuffersCompleteCallbackCHROMIUM( |
| 124 WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* callback); | 124 WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* callback); |
| 125 | 125 |
| 126 virtual void prepareTexture(); | 126 virtual void prepareTexture(); |
| 127 virtual void postSubBufferCHROMIUM(int x, int y, int width, int height); | 127 virtual void postSubBufferCHROMIUM(int x, int y, int width, int height); |
| 128 virtual void finish(); | 128 virtual void finish(); |
| 129 virtual void flush(); | 129 virtual void flush(); |
| 130 | 130 |
| 131 virtual void bindBuffer(WebKit::WGC3Denum target, WebKit::WebGLId buffer); | 131 virtual void bindBuffer(blink::WGC3Denum target, blink::WebGLId buffer); |
| 132 virtual void bufferData(WebKit::WGC3Denum target, | 132 virtual void bufferData(blink::WGC3Denum target, |
| 133 WebKit::WGC3Dsizeiptr size, | 133 blink::WGC3Dsizeiptr size, |
| 134 const void* data, | 134 const void* data, |
| 135 WebKit::WGC3Denum usage); | 135 blink::WGC3Denum usage); |
| 136 virtual void* mapBufferCHROMIUM(WebKit::WGC3Denum target, | 136 virtual void* mapBufferCHROMIUM(blink::WGC3Denum target, |
| 137 WebKit::WGC3Denum access); | 137 blink::WGC3Denum access); |
| 138 virtual WebKit::WGC3Dboolean unmapBufferCHROMIUM(WebKit::WGC3Denum target); | 138 virtual blink::WGC3Dboolean unmapBufferCHROMIUM(blink::WGC3Denum target); |
| 139 | 139 |
| 140 virtual WebKit::WGC3Duint createImageCHROMIUM( | 140 virtual blink::WGC3Duint createImageCHROMIUM( |
| 141 WebKit::WGC3Dsizei width, | 141 blink::WGC3Dsizei width, |
| 142 WebKit::WGC3Dsizei height, | 142 blink::WGC3Dsizei height, |
| 143 WebKit::WGC3Denum internalformat); | 143 blink::WGC3Denum internalformat); |
| 144 virtual void destroyImageCHROMIUM(WebKit::WGC3Duint image_id); | 144 virtual void destroyImageCHROMIUM(blink::WGC3Duint image_id); |
| 145 virtual void getImageParameterivCHROMIUM( | 145 virtual void getImageParameterivCHROMIUM( |
| 146 WebKit::WGC3Duint image_id, | 146 blink::WGC3Duint image_id, |
| 147 WebKit::WGC3Denum pname, | 147 blink::WGC3Denum pname, |
| 148 WebKit::WGC3Dint* params); | 148 blink::WGC3Dint* params); |
| 149 virtual void* mapImageCHROMIUM( | 149 virtual void* mapImageCHROMIUM( |
| 150 WebKit::WGC3Duint image_id, | 150 blink::WGC3Duint image_id, |
| 151 WebKit::WGC3Denum access); | 151 blink::WGC3Denum access); |
| 152 virtual void unmapImageCHROMIUM(WebKit::WGC3Duint image_id); | 152 virtual void unmapImageCHROMIUM(blink::WGC3Duint image_id); |
| 153 | 153 |
| 154 const ContextProvider::Capabilities& test_capabilities() const { | 154 const ContextProvider::Capabilities& test_capabilities() const { |
| 155 return test_capabilities_; | 155 return test_capabilities_; |
| 156 } | 156 } |
| 157 | 157 |
| 158 // When set, MakeCurrent() will fail after this many times. | 158 // When set, MakeCurrent() will fail after this many times. |
| 159 void set_times_make_current_succeeds(int times) { | 159 void set_times_make_current_succeeds(int times) { |
| 160 times_make_current_succeeds_ = times; | 160 times_make_current_succeeds_ = times; |
| 161 } | 161 } |
| 162 void set_times_bind_texture_succeeds(int times) { | 162 void set_times_bind_texture_succeeds(int times) { |
| 163 times_bind_texture_succeeds_ = times; | 163 times_bind_texture_succeeds_ = times; |
| 164 } | 164 } |
| 165 void set_times_end_query_succeeds(int times) { | 165 void set_times_end_query_succeeds(int times) { |
| 166 times_end_query_succeeds_ = times; | 166 times_end_query_succeeds_ = times; |
| 167 } | 167 } |
| 168 void set_times_gen_mailbox_succeeds(int times) { | 168 void set_times_gen_mailbox_succeeds(int times) { |
| 169 times_gen_mailbox_succeeds_ = times; | 169 times_gen_mailbox_succeeds_ = times; |
| 170 } | 170 } |
| 171 | 171 |
| 172 // When set, mapImageCHROMIUM and mapBufferCHROMIUM will return NULL after | 172 // When set, mapImageCHROMIUM and mapBufferCHROMIUM will return NULL after |
| 173 // this many times. | 173 // this many times. |
| 174 void set_times_map_image_chromium_succeeds(int times) { | 174 void set_times_map_image_chromium_succeeds(int times) { |
| 175 times_map_image_chromium_succeeds_ = times; | 175 times_map_image_chromium_succeeds_ = times; |
| 176 } | 176 } |
| 177 void set_times_map_buffer_chromium_succeeds(int times) { | 177 void set_times_map_buffer_chromium_succeeds(int times) { |
| 178 times_map_buffer_chromium_succeeds_ = times; | 178 times_map_buffer_chromium_succeeds_ = times; |
| 179 } | 179 } |
| 180 | 180 |
| 181 size_t NumTextures() const; | 181 size_t NumTextures() const; |
| 182 WebKit::WebGLId TextureAt(int i) const; | 182 blink::WebGLId TextureAt(int i) const; |
| 183 | 183 |
| 184 size_t NumUsedTextures() const { return used_textures_.size(); } | 184 size_t NumUsedTextures() const { return used_textures_.size(); } |
| 185 bool UsedTexture(int texture) const { | 185 bool UsedTexture(int texture) const { |
| 186 return ContainsKey(used_textures_, texture); | 186 return ContainsKey(used_textures_, texture); |
| 187 } | 187 } |
| 188 void ResetUsedTextures() { used_textures_.clear(); } | 188 void ResetUsedTextures() { used_textures_.clear(); } |
| 189 | 189 |
| 190 void set_support_swapbuffers_complete_callback(bool support) { | 190 void set_support_swapbuffers_complete_callback(bool support) { |
| 191 test_capabilities_.swapbuffers_complete_callback = support; | 191 test_capabilities_.swapbuffers_complete_callback = support; |
| 192 } | 192 } |
| 193 void set_have_extension_io_surface(bool have) { | 193 void set_have_extension_io_surface(bool have) { |
| 194 test_capabilities_.iosurface = have; | 194 test_capabilities_.iosurface = have; |
| 195 test_capabilities_.texture_rectangle = have; | 195 test_capabilities_.texture_rectangle = have; |
| 196 } | 196 } |
| 197 void set_have_extension_egl_image(bool have) { | 197 void set_have_extension_egl_image(bool have) { |
| 198 test_capabilities_.egl_image_external = have; | 198 test_capabilities_.egl_image_external = have; |
| 199 } | 199 } |
| 200 void set_have_post_sub_buffer(bool have) { | 200 void set_have_post_sub_buffer(bool have) { |
| 201 test_capabilities_.post_sub_buffer = have; | 201 test_capabilities_.post_sub_buffer = have; |
| 202 } | 202 } |
| 203 void set_have_discard_framebuffer(bool have) { | 203 void set_have_discard_framebuffer(bool have) { |
| 204 test_capabilities_.discard_framebuffer = have; | 204 test_capabilities_.discard_framebuffer = have; |
| 205 } | 205 } |
| 206 void set_support_compressed_texture_etc1(bool support) { | 206 void set_support_compressed_texture_etc1(bool support) { |
| 207 test_capabilities_.texture_format_etc1 = support; | 207 test_capabilities_.texture_format_etc1 = support; |
| 208 } | 208 } |
| 209 | 209 |
| 210 // When this context is lost, all contexts in its share group are also lost. | 210 // When this context is lost, all contexts in its share group are also lost. |
| 211 void add_share_group_context(WebKit::WebGraphicsContext3D* context3d) { | 211 void add_share_group_context(blink::WebGraphicsContext3D* context3d) { |
| 212 shared_contexts_.push_back(context3d); | 212 shared_contexts_.push_back(context3d); |
| 213 } | 213 } |
| 214 | 214 |
| 215 void set_max_texture_size(int size) { max_texture_size_ = size; } | 215 void set_max_texture_size(int size) { max_texture_size_ = size; } |
| 216 | 216 |
| 217 static const WebKit::WebGLId kExternalTextureId; | 217 static const blink::WebGLId kExternalTextureId; |
| 218 virtual WebKit::WebGLId NextTextureId(); | 218 virtual blink::WebGLId NextTextureId(); |
| 219 virtual void RetireTextureId(WebKit::WebGLId id); | 219 virtual void RetireTextureId(blink::WebGLId id); |
| 220 | 220 |
| 221 virtual WebKit::WebGLId NextBufferId(); | 221 virtual blink::WebGLId NextBufferId(); |
| 222 virtual void RetireBufferId(WebKit::WebGLId id); | 222 virtual void RetireBufferId(blink::WebGLId id); |
| 223 | 223 |
| 224 virtual WebKit::WebGLId NextImageId(); | 224 virtual blink::WebGLId NextImageId(); |
| 225 virtual void RetireImageId(WebKit::WebGLId id); | 225 virtual void RetireImageId(blink::WebGLId id); |
| 226 | 226 |
| 227 size_t GetTransferBufferMemoryUsedBytes() const; | 227 size_t GetTransferBufferMemoryUsedBytes() const; |
| 228 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes); | 228 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes); |
| 229 | 229 |
| 230 void set_test_support(TestContextSupport* test_support) { | 230 void set_test_support(TestContextSupport* test_support) { |
| 231 test_support_ = test_support; | 231 test_support_ = test_support; |
| 232 } | 232 } |
| 233 | 233 |
| 234 int width() const { return width_; } | 234 int width() const { return width_; } |
| 235 int height() const { return height_; } | 235 int height() const { return height_; } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 247 | 247 |
| 248 UpdateType last_update_type() { | 248 UpdateType last_update_type() { |
| 249 return last_update_type_; | 249 return last_update_type_; |
| 250 } | 250 } |
| 251 | 251 |
| 252 protected: | 252 protected: |
| 253 struct TextureTargets { | 253 struct TextureTargets { |
| 254 TextureTargets(); | 254 TextureTargets(); |
| 255 ~TextureTargets(); | 255 ~TextureTargets(); |
| 256 | 256 |
| 257 void BindTexture(WebKit::WGC3Denum target, WebKit::WebGLId id); | 257 void BindTexture(blink::WGC3Denum target, blink::WebGLId id); |
| 258 void UnbindTexture(WebKit::WebGLId id); | 258 void UnbindTexture(blink::WebGLId id); |
| 259 | 259 |
| 260 WebKit::WebGLId BoundTexture(WebKit::WGC3Denum target); | 260 blink::WebGLId BoundTexture(blink::WGC3Denum target); |
| 261 | 261 |
| 262 private: | 262 private: |
| 263 typedef base::hash_map<WebKit::WGC3Denum, WebKit::WebGLId> TargetTextureMap; | 263 typedef base::hash_map<blink::WGC3Denum, blink::WebGLId> TargetTextureMap; |
| 264 TargetTextureMap bound_textures_; | 264 TargetTextureMap bound_textures_; |
| 265 }; | 265 }; |
| 266 | 266 |
| 267 struct Buffer { | 267 struct Buffer { |
| 268 Buffer(); | 268 Buffer(); |
| 269 ~Buffer(); | 269 ~Buffer(); |
| 270 | 270 |
| 271 WebKit::WGC3Denum target; | 271 blink::WGC3Denum target; |
| 272 scoped_ptr<uint8[]> pixels; | 272 scoped_ptr<uint8[]> pixels; |
| 273 size_t size; | 273 size_t size; |
| 274 | 274 |
| 275 private: | 275 private: |
| 276 DISALLOW_COPY_AND_ASSIGN(Buffer); | 276 DISALLOW_COPY_AND_ASSIGN(Buffer); |
| 277 }; | 277 }; |
| 278 | 278 |
| 279 struct Image { | 279 struct Image { |
| 280 Image(); | 280 Image(); |
| 281 ~Image(); | 281 ~Image(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 302 friend class base::RefCountedThreadSafe<Namespace>; | 302 friend class base::RefCountedThreadSafe<Namespace>; |
| 303 ~Namespace(); | 303 ~Namespace(); |
| 304 DISALLOW_COPY_AND_ASSIGN(Namespace); | 304 DISALLOW_COPY_AND_ASSIGN(Namespace); |
| 305 }; | 305 }; |
| 306 | 306 |
| 307 TestWebGraphicsContext3D(); | 307 TestWebGraphicsContext3D(); |
| 308 | 308 |
| 309 void CallAllSyncPointCallbacks(); | 309 void CallAllSyncPointCallbacks(); |
| 310 void SwapBuffersComplete(); | 310 void SwapBuffersComplete(); |
| 311 void CreateNamespace(); | 311 void CreateNamespace(); |
| 312 WebKit::WebGLId BoundTextureId(WebKit::WGC3Denum target); | 312 blink::WebGLId BoundTextureId(blink::WGC3Denum target); |
| 313 | 313 |
| 314 unsigned context_id_; | 314 unsigned context_id_; |
| 315 Attributes attributes_; | 315 Attributes attributes_; |
| 316 ContextProvider::Capabilities test_capabilities_; | 316 ContextProvider::Capabilities test_capabilities_; |
| 317 int times_make_current_succeeds_; | 317 int times_make_current_succeeds_; |
| 318 int times_bind_texture_succeeds_; | 318 int times_bind_texture_succeeds_; |
| 319 int times_end_query_succeeds_; | 319 int times_end_query_succeeds_; |
| 320 int times_gen_mailbox_succeeds_; | 320 int times_gen_mailbox_succeeds_; |
| 321 bool context_lost_; | 321 bool context_lost_; |
| 322 int times_map_image_chromium_succeeds_; | 322 int times_map_image_chromium_succeeds_; |
| 323 int times_map_buffer_chromium_succeeds_; | 323 int times_map_buffer_chromium_succeeds_; |
| 324 WebGraphicsContextLostCallback* context_lost_callback_; | 324 WebGraphicsContextLostCallback* context_lost_callback_; |
| 325 WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* swap_buffers_callback_; | 325 WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* swap_buffers_callback_; |
| 326 base::hash_set<unsigned> used_textures_; | 326 base::hash_set<unsigned> used_textures_; |
| 327 unsigned next_program_id_; | 327 unsigned next_program_id_; |
| 328 base::hash_set<unsigned> program_set_; | 328 base::hash_set<unsigned> program_set_; |
| 329 unsigned next_shader_id_; | 329 unsigned next_shader_id_; |
| 330 base::hash_set<unsigned> shader_set_; | 330 base::hash_set<unsigned> shader_set_; |
| 331 std::vector<WebKit::WebGraphicsContext3D*> shared_contexts_; | 331 std::vector<blink::WebGraphicsContext3D*> shared_contexts_; |
| 332 int max_texture_size_; | 332 int max_texture_size_; |
| 333 bool reshape_called_; | 333 bool reshape_called_; |
| 334 int width_; | 334 int width_; |
| 335 int height_; | 335 int height_; |
| 336 float scale_factor_; | 336 float scale_factor_; |
| 337 TestContextSupport* test_support_; | 337 TestContextSupport* test_support_; |
| 338 gfx::Rect update_rect_; | 338 gfx::Rect update_rect_; |
| 339 UpdateType last_update_type_; | 339 UpdateType last_update_type_; |
| 340 | 340 |
| 341 unsigned bound_buffer_; | 341 unsigned bound_buffer_; |
| 342 TextureTargets texture_targets_; | 342 TextureTargets texture_targets_; |
| 343 | 343 |
| 344 scoped_refptr<Namespace> namespace_; | 344 scoped_refptr<Namespace> namespace_; |
| 345 static Namespace* shared_namespace_; | 345 static Namespace* shared_namespace_; |
| 346 | 346 |
| 347 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; | 347 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; |
| 348 }; | 348 }; |
| 349 | 349 |
| 350 } // namespace cc | 350 } // namespace cc |
| 351 | 351 |
| 352 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 352 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
| OLD | NEW |