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/callback.h" | 10 #include "base/callback.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 const void* pixels) {} | 180 const void* pixels) {} |
181 | 181 |
182 virtual void genMailboxCHROMIUM(GLbyte* mailbox); | 182 virtual void genMailboxCHROMIUM(GLbyte* mailbox); |
183 virtual void produceTextureCHROMIUM(GLenum target, | 183 virtual void produceTextureCHROMIUM(GLenum target, |
184 const GLbyte* mailbox) { } | 184 const GLbyte* mailbox) { } |
185 virtual void produceTextureDirectCHROMIUM(GLuint texture, | 185 virtual void produceTextureDirectCHROMIUM(GLuint texture, |
186 GLenum target, | 186 GLenum target, |
187 const GLbyte* mailbox) {} | 187 const GLbyte* mailbox) {} |
188 virtual void consumeTextureCHROMIUM(GLenum target, | 188 virtual void consumeTextureCHROMIUM(GLenum target, |
189 const GLbyte* mailbox) { } | 189 const GLbyte* mailbox) { } |
190 virtual GLuint createAndConsumeTextureCHROMIUM(GLenum target, | 190 GLuint createAndConsumeTextureCHROMIUM(GLenum target, const GLbyte* mailbox); |
191 const GLbyte* mailbox); | |
192 | 191 |
193 virtual void loseContextCHROMIUM(GLenum current, GLenum other); | 192 virtual void loseContextCHROMIUM(GLenum current, GLenum other); |
194 | 193 |
195 virtual void bindTexImage2DCHROMIUM(GLenum target, GLint image_id) {} | 194 virtual void bindTexImage2DCHROMIUM(GLenum target, GLint image_id) {} |
196 | 195 |
197 virtual void drawArrays(GLenum mode, GLint first, GLsizei count) {} | 196 virtual void drawArrays(GLenum mode, GLint first, GLsizei count) {} |
198 virtual void drawElements(GLenum mode, | 197 virtual void drawElements(GLenum mode, |
199 GLsizei count, | 198 GLsizei count, |
200 GLenum type, | 199 GLenum type, |
201 GLintptr offset) {} | 200 GLintptr offset) {} |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 friend class base::RefCountedThreadSafe<Namespace>; | 428 friend class base::RefCountedThreadSafe<Namespace>; |
430 ~Namespace(); | 429 ~Namespace(); |
431 DISALLOW_COPY_AND_ASSIGN(Namespace); | 430 DISALLOW_COPY_AND_ASSIGN(Namespace); |
432 }; | 431 }; |
433 | 432 |
434 TestWebGraphicsContext3D(); | 433 TestWebGraphicsContext3D(); |
435 | 434 |
436 void CreateNamespace(); | 435 void CreateNamespace(); |
437 GLuint BoundTextureId(GLenum target); | 436 GLuint BoundTextureId(GLenum target); |
438 scoped_refptr<TestTexture> BoundTexture(GLenum target); | 437 scoped_refptr<TestTexture> BoundTexture(GLenum target); |
| 438 scoped_refptr<TestTexture> UnboundTexture(GLuint texture); |
439 void CheckTextureIsBound(GLenum target); | 439 void CheckTextureIsBound(GLenum target); |
440 | 440 |
441 unsigned context_id_; | 441 unsigned context_id_; |
442 ContextProvider::Capabilities test_capabilities_; | 442 ContextProvider::Capabilities test_capabilities_; |
443 int times_bind_texture_succeeds_; | 443 int times_bind_texture_succeeds_; |
444 int times_end_query_succeeds_; | 444 int times_end_query_succeeds_; |
445 bool context_lost_; | 445 bool context_lost_; |
446 int times_map_image_chromium_succeeds_; | 446 int times_map_image_chromium_succeeds_; |
447 int times_map_buffer_chromium_succeeds_; | 447 int times_map_buffer_chromium_succeeds_; |
448 int current_used_transfer_buffer_usage_bytes_; | 448 int current_used_transfer_buffer_usage_bytes_; |
(...skipping 21 matching lines...) Expand all Loading... |
470 | 470 |
471 scoped_refptr<Namespace> namespace_; | 471 scoped_refptr<Namespace> namespace_; |
472 static Namespace* shared_namespace_; | 472 static Namespace* shared_namespace_; |
473 | 473 |
474 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; | 474 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; |
475 }; | 475 }; |
476 | 476 |
477 } // namespace cc | 477 } // namespace cc |
478 | 478 |
479 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 479 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
OLD | NEW |