| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 347 |
| 348 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes); | 348 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes); |
| 349 size_t max_used_transfer_buffer_usage_bytes() const { | 349 size_t max_used_transfer_buffer_usage_bytes() const { |
| 350 return max_used_transfer_buffer_usage_bytes_; | 350 return max_used_transfer_buffer_usage_bytes_; |
| 351 } | 351 } |
| 352 | 352 |
| 353 void set_test_support(TestContextSupport* test_support) { | 353 void set_test_support(TestContextSupport* test_support) { |
| 354 test_support_ = test_support; | 354 test_support_ = test_support; |
| 355 } | 355 } |
| 356 | 356 |
| 357 // Set this to 1 to make async texture uploads complete. |
| 358 void set_query_result_available_ext(int value) { |
| 359 query_result_available_ext_ = value; |
| 360 } |
| 361 |
| 357 int width() const { return width_; } | 362 int width() const { return width_; } |
| 358 int height() const { return height_; } | 363 int height() const { return height_; } |
| 359 bool reshape_called() const { return reshape_called_; } | 364 bool reshape_called() const { return reshape_called_; } |
| 360 void clear_reshape_called() { reshape_called_ = false; } | 365 void clear_reshape_called() { reshape_called_ = false; } |
| 361 float scale_factor() const { return scale_factor_; } | 366 float scale_factor() const { return scale_factor_; } |
| 362 | 367 |
| 363 enum UpdateType { | 368 enum UpdateType { |
| 364 NoUpdate = 0, | 369 NoUpdate = 0, |
| 365 PrepareTexture, | 370 PrepareTexture, |
| 366 PostSubBuffer | 371 PostSubBuffer |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 int max_texture_size_; | 455 int max_texture_size_; |
| 451 bool reshape_called_; | 456 bool reshape_called_; |
| 452 int width_; | 457 int width_; |
| 453 int height_; | 458 int height_; |
| 454 float scale_factor_; | 459 float scale_factor_; |
| 455 TestContextSupport* test_support_; | 460 TestContextSupport* test_support_; |
| 456 gfx::Rect update_rect_; | 461 gfx::Rect update_rect_; |
| 457 UpdateType last_update_type_; | 462 UpdateType last_update_type_; |
| 458 unsigned next_insert_sync_point_; | 463 unsigned next_insert_sync_point_; |
| 459 unsigned last_waited_sync_point_; | 464 unsigned last_waited_sync_point_; |
| 465 int query_result_available_ext_; |
| 460 | 466 |
| 461 unsigned bound_buffer_; | 467 unsigned bound_buffer_; |
| 462 TextureTargets texture_targets_; | 468 TextureTargets texture_targets_; |
| 463 | 469 |
| 464 scoped_refptr<Namespace> namespace_; | 470 scoped_refptr<Namespace> namespace_; |
| 465 static Namespace* shared_namespace_; | 471 static Namespace* shared_namespace_; |
| 466 | 472 |
| 467 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; | 473 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; |
| 468 }; | 474 }; |
| 469 | 475 |
| 470 } // namespace cc | 476 } // namespace cc |
| 471 | 477 |
| 472 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 478 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
| OLD | NEW |