| 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 virtual void RetireTextureId(GLuint id); | 318 virtual void RetireTextureId(GLuint id); |
| 319 | 319 |
| 320 virtual GLuint NextBufferId(); | 320 virtual GLuint NextBufferId(); |
| 321 virtual void RetireBufferId(GLuint id); | 321 virtual void RetireBufferId(GLuint id); |
| 322 | 322 |
| 323 virtual GLuint NextImageId(); | 323 virtual GLuint NextImageId(); |
| 324 virtual void RetireImageId(GLuint id); | 324 virtual void RetireImageId(GLuint id); |
| 325 | 325 |
| 326 size_t GetTransferBufferMemoryUsedBytes() const; | 326 size_t GetTransferBufferMemoryUsedBytes() const; |
| 327 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes); | 327 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes); |
| 328 size_t GetPeakTransferBufferMemoryUsedBytes() const { | |
| 329 return peak_transfer_buffer_memory_used_bytes_; | |
| 330 } | |
| 331 | 328 |
| 332 void set_test_support(TestContextSupport* test_support) { | 329 void set_test_support(TestContextSupport* test_support) { |
| 333 test_support_ = test_support; | 330 test_support_ = test_support; |
| 334 } | 331 } |
| 335 | 332 |
| 336 int width() const { return width_; } | 333 int width() const { return width_; } |
| 337 int height() const { return height_; } | 334 int height() const { return height_; } |
| 338 bool reshape_called() const { return reshape_called_; } | 335 bool reshape_called() const { return reshape_called_; } |
| 339 void clear_reshape_called() { reshape_called_ = false; } | 336 void clear_reshape_called() { reshape_called_ = false; } |
| 340 float scale_factor() const { return scale_factor_; } | 337 float scale_factor() const { return scale_factor_; } |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 float scale_factor_; | 429 float scale_factor_; |
| 433 TestContextSupport* test_support_; | 430 TestContextSupport* test_support_; |
| 434 gfx::Rect update_rect_; | 431 gfx::Rect update_rect_; |
| 435 UpdateType last_update_type_; | 432 UpdateType last_update_type_; |
| 436 unsigned next_insert_sync_point_; | 433 unsigned next_insert_sync_point_; |
| 437 unsigned last_waited_sync_point_; | 434 unsigned last_waited_sync_point_; |
| 438 | 435 |
| 439 unsigned bound_buffer_; | 436 unsigned bound_buffer_; |
| 440 TextureTargets texture_targets_; | 437 TextureTargets texture_targets_; |
| 441 | 438 |
| 442 size_t peak_transfer_buffer_memory_used_bytes_; | |
| 443 | |
| 444 scoped_refptr<Namespace> namespace_; | 439 scoped_refptr<Namespace> namespace_; |
| 445 static Namespace* shared_namespace_; | 440 static Namespace* shared_namespace_; |
| 446 | 441 |
| 447 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; | 442 base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_; |
| 448 }; | 443 }; |
| 449 | 444 |
| 450 } // namespace cc | 445 } // namespace cc |
| 451 | 446 |
| 452 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ | 447 #endif // CC_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_ |
| OLD | NEW |