diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-10 21:24:52 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-10 21:24:52 +0000 |
commit | fa9a830d064c639117c09ee9387f460ba9c9ffc7 (patch) | |
tree | 484263fc5244aa03054461f09e12b50e0d1fb881 /cc/test/test_web_graphics_context_3d.h | |
parent | afdef6ded67bf3ed540b6a1d9a175e1f9bb5c343 (diff) | |
download | chromium_src-fa9a830d064c639117c09ee9387f460ba9c9ffc7.zip chromium_src-fa9a830d064c639117c09ee9387f460ba9c9ffc7.tar.gz chromium_src-fa9a830d064c639117c09ee9387f460ba9c9ffc7.tar.bz2 |
Fix flaky test LayerTreeHostTestMaxTransferBufferUsageBytes.
This test wants to ensure we don't use more than N bytes of transfer
buffer. But it does this by querying the current number of bytes at
some time. As we mark any uploads as complete we could end up with
less bytes in use at the time of the query, so this could be flaky.
Instead, track the max number of bytes ever used in the context to get
the real value that this test is looking for. And re-enable the test.
R=enne, jamesr
BUG=380662
Review URL: https://codereview.chromium.org/326733002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276155 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/test_web_graphics_context_3d.h')
-rw-r--r-- | cc/test/test_web_graphics_context_3d.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cc/test/test_web_graphics_context_3d.h b/cc/test/test_web_graphics_context_3d.h index 3ce3ddd..3cbe9ca 100644 --- a/cc/test/test_web_graphics_context_3d.h +++ b/cc/test/test_web_graphics_context_3d.h @@ -323,8 +323,10 @@ class TestWebGraphicsContext3D { virtual GLuint NextImageId(); virtual void RetireImageId(GLuint id); - size_t GetTransferBufferMemoryUsedBytes() const; void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes); + size_t max_used_transfer_buffer_usage_bytes() const { + return max_used_transfer_buffer_usage_bytes_; + } void set_test_support(TestContextSupport* test_support) { test_support_ = test_support; @@ -415,6 +417,8 @@ class TestWebGraphicsContext3D { bool context_lost_; int times_map_image_chromium_succeeds_; int times_map_buffer_chromium_succeeds_; + int current_used_transfer_buffer_usage_bytes_; + int max_used_transfer_buffer_usage_bytes_; base::Closure context_lost_callback_; base::hash_set<unsigned> used_textures_; unsigned next_program_id_; |