diff options
author | achaulk <achaulk@chromium.org> | 2015-01-22 14:13:44 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-22 22:14:23 +0000 |
commit | b937bfa4d5eaca4c9ac6ec13715792238cef1b98 (patch) | |
tree | 42ff56b45ef41e47c46b7e660d6a6ea3da0dac2f /cc/test/test_web_graphics_context_3d.h | |
parent | a2752c14925409807eb4022ef79dfc736b4a883c (diff) | |
download | chromium_src-b937bfa4d5eaca4c9ac6ec13715792238cef1b98.zip chromium_src-b937bfa4d5eaca4c9ac6ec13715792238cef1b98.tar.gz chromium_src-b937bfa4d5eaca4c9ac6ec13715792238cef1b98.tar.bz2 |
Add the ability for test contexts to generate unique render & framebuffer IDs
Also, adds tests for that and a test to make sure a non-zero framebuffer
is preserved throughout DrawFrame. This is needed for a new render path
using overlays instead of using the default surface.
Review URL: https://codereview.chromium.org/384053002
Cr-Commit-Position: refs/heads/master@{#312687}
Diffstat (limited to 'cc/test/test_web_graphics_context_3d.h')
-rw-r--r-- | cc/test/test_web_graphics_context_3d.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cc/test/test_web_graphics_context_3d.h b/cc/test/test_web_graphics_context_3d.h index 0c001d2..31182f8 100644 --- a/cc/test/test_web_graphics_context_3d.h +++ b/cc/test/test_web_graphics_context_3d.h @@ -352,6 +352,12 @@ class TestWebGraphicsContext3D { virtual GLuint NextImageId(); virtual void RetireImageId(GLuint id); + virtual GLuint NextFramebufferId(); + virtual void RetireFramebufferId(GLuint id); + + virtual GLuint NextRenderbufferId(); + virtual void RetireRenderbufferId(GLuint id); + 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_; @@ -422,9 +428,11 @@ class TestWebGraphicsContext3D { unsigned next_buffer_id; unsigned next_image_id; unsigned next_texture_id; + unsigned next_renderbuffer_id; base::ScopedPtrHashMap<unsigned, Buffer> buffers; base::hash_set<unsigned> images; OrderedTextureMap textures; + base::hash_set<unsigned> renderbuffer_set; private: friend class base::RefCountedThreadSafe<Namespace>; @@ -453,6 +461,9 @@ class TestWebGraphicsContext3D { base::hash_set<unsigned> program_set_; unsigned next_shader_id_; base::hash_set<unsigned> shader_set_; + unsigned next_framebuffer_id_; + base::hash_set<unsigned> framebuffer_set_; + unsigned current_framebuffer_; std::vector<TestWebGraphicsContext3D*> shared_contexts_; int max_texture_size_; bool reshape_called_; |