| 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 return test_capabilities_; | 256 return test_capabilities_; |
| 257 } | 257 } |
| 258 | 258 |
| 259 void set_context_lost(bool context_lost) { context_lost_ = context_lost; } | 259 void set_context_lost(bool context_lost) { context_lost_ = context_lost; } |
| 260 void set_times_bind_texture_succeeds(int times) { | 260 void set_times_bind_texture_succeeds(int times) { |
| 261 times_bind_texture_succeeds_ = times; | 261 times_bind_texture_succeeds_ = times; |
| 262 } | 262 } |
| 263 void set_times_end_query_succeeds(int times) { | 263 void set_times_end_query_succeeds(int times) { |
| 264 times_end_query_succeeds_ = times; | 264 times_end_query_succeeds_ = times; |
| 265 } | 265 } |
| 266 void set_times_gen_mailbox_succeeds(int times) { | |
| 267 times_gen_mailbox_succeeds_ = times; | |
| 268 } | |
| 269 | 266 |
| 270 // When set, mapImageCHROMIUM and mapBufferCHROMIUM will return NULL after | 267 // When set, mapImageCHROMIUM and mapBufferCHROMIUM will return NULL after |
| 271 // this many times. | 268 // this many times. |
| 272 void set_times_map_image_chromium_succeeds(int times) { | 269 void set_times_map_image_chromium_succeeds(int times) { |
| 273 times_map_image_chromium_succeeds_ = times; | 270 times_map_image_chromium_succeeds_ = times; |
| 274 } | 271 } |
| 275 void set_times_map_buffer_chromium_succeeds(int times) { | 272 void set_times_map_buffer_chromium_succeeds(int times) { |
| 276 times_map_buffer_chromium_succeeds_ = times; | 273 times_map_buffer_chromium_succeeds_ = times; |
| 277 } | 274 } |
| 278 | 275 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 | 404 |
| 408 void CreateNamespace(); | 405 void CreateNamespace(); |
| 409 GLuint BoundTextureId(GLenum target); | 406 GLuint BoundTextureId(GLenum target); |
| 410 scoped_refptr<TestTexture> BoundTexture(GLenum target); | 407 scoped_refptr<TestTexture> BoundTexture(GLenum target); |
| 411 void CheckTextureIsBound(GLenum target); | 408 void CheckTextureIsBound(GLenum target); |
| 412 | 409 |
| 413 unsigned context_id_; | 410 unsigned context_id_; |
| 414 ContextProvider::Capabilities test_capabilities_; | 411 ContextProvider::Capabilities test_capabilities_; |
| 415 int times_bind_texture_succeeds_; | 412 int times_bind_texture_succeeds_; |
| 416 int times_end_query_succeeds_; | 413 int times_end_query_succeeds_; |
| 417 int times_gen_mailbox_succeeds_; | |
| 418 bool context_lost_; | 414 bool context_lost_; |
| 419 int times_map_image_chromium_succeeds_; | 415 int times_map_image_chromium_succeeds_; |
| 420 int times_map_buffer_chromium_succeeds_; | 416 int times_map_buffer_chromium_succeeds_; |
| 421 base::Closure context_lost_callback_; | 417 base::Closure context_lost_callback_; |
| 422 base::hash_set<unsigned> used_textures_; | 418 base::hash_set<unsigned> used_textures_; |
| 423 unsigned next_program_id_; | 419 unsigned next_program_id_; |
| 424 base::hash_set<unsigned> program_set_; | 420 base::hash_set<unsigned> program_set_; |
| 425 unsigned next_shader_id_; | 421 unsigned next_shader_id_; |
| 426 base::hash_set<unsigned> shader_set_; | 422 base::hash_set<unsigned> shader_set_; |
| 427 std::vector<TestWebGraphicsContext3D*> shared_contexts_; | 423 std::vector<TestWebGraphicsContext3D*> shared_contexts_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 443 | 439 |
| 444 scoped_refptr<Namespace> namespace_; | 440 scoped_refptr<Namespace> namespace_; |
| 445 static Namespace* shared_namespace_; | 441 static Namespace* shared_namespace_; |
| 446 | 442 |
| 447 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; | 443 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; |
| 448 }; | 444 }; |
| 449 | 445 |
| 450 } // namespace cc | 446 } // namespace cc |
| 451 | 447 |
| 452 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 448 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
| OLD | NEW |