diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-29 13:11:04 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-29 13:11:04 +0000 |
commit | fd32d12c2b5df2ea7391003dca7307094535a297 (patch) | |
tree | da94ae6e14da3c03f679bb81a848fa653d6beca2 /cc/test/test_web_graphics_context_3d.h | |
parent | fecf9f77fccd08c22e9655843a534c79ed0ba567 (diff) | |
download | chromium_src-fd32d12c2b5df2ea7391003dca7307094535a297.zip chromium_src-fd32d12c2b5df2ea7391003dca7307094535a297.tar.gz chromium_src-fd32d12c2b5df2ea7391003dca7307094535a297.tar.bz2 |
cc: Pipe visibility and memory allocation to DelegatingRenderer
The GPU process makes memory allocation decisions based on the visibility of
surface. In the DelegatingRenderer case we don't use the surface directly, but
we still have it - just like composite-to-mailbox. So we can use
setVisibilityCHROMIUM to signal the GPU process, and listen to the memory
allocation callback.
This CL refactors a bunch of the logic that was hardcoded in GLRenderer into
OutputSurface which is shared. That also opens the door to implementing a memory
manager for the software renderer.
BUG=123444
Review URL: https://chromiumcodereview.appspot.com/18121005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209287 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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cc/test/test_web_graphics_context_3d.h b/cc/test/test_web_graphics_context_3d.h index 401fa4a4..4855b0a 100644 --- a/cc/test/test_web_graphics_context_3d.h +++ b/cc/test/test_web_graphics_context_3d.h @@ -114,6 +114,9 @@ class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D { virtual void setSwapBuffersCompleteCallbackCHROMIUM( WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* callback); + virtual void setMemoryAllocationChangedCallbackCHROMIUM( + WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* callback); + virtual void prepareTexture(); virtual void finish(); virtual void flush(); @@ -196,6 +199,8 @@ class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D { virtual WebKit::WebGLId NextImageId(); + void SetMemoryAllocation(WebKit::WebGraphicsMemoryAllocation allocation); + protected: TestWebGraphicsContext3D(); TestWebGraphicsContext3D( @@ -220,6 +225,8 @@ class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D { int times_map_buffer_chromium_succeeds_; WebGraphicsContextLostCallback* context_lost_callback_; WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* swap_buffers_callback_; + WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* + memory_allocation_changed_callback_; std::vector<WebGraphicsSyncPointCallback*> sync_point_callbacks_; std::vector<WebKit::WebGLId> textures_; base::hash_set<WebKit::WebGLId> used_textures_; |