summaryrefslogtreecommitdiffstats
path: root/cc/test/test_web_graphics_context_3d.h
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-03 08:04:17 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-03 08:04:17 +0000
commit5128ada4e135b87d1e7b28ef8347bdf477cf8781 (patch)
treee6238483a2d9a95fe255c7a993e37a3766846102 /cc/test/test_web_graphics_context_3d.h
parent698953877ea07a2f461d613f912f834194fa6457 (diff)
downloadchromium_src-5128ada4e135b87d1e7b28ef8347bdf477cf8781.zip
chromium_src-5128ada4e135b87d1e7b28ef8347bdf477cf8781.tar.gz
chromium_src-5128ada4e135b87d1e7b28ef8347bdf477cf8781.tar.bz2
cc: Allow copy requests to provide a texture.
When many readbacks will be occuring in a row, we don't want to have texture create/delete calls constantly churning through GPU memory. In particular, this has been a severe performance bottleneck on some intel drivers. Instead provide a way for the copy request client to provide a texture to the compositor that it will use, and then the texture can be reused for as long as the client wishes. In the case of tab capture, the client (in RenderWidgetHostViewAura) wants to use the GLHelper to act on the given texture. Since the GLHelper lives on the main thread, and the compositor draws on the compositor thread, we provide the texture from the client through the main thread CopyOutputRequest API rather than hooking directly into the compositor thread. I moved the async readback unit tests out to their own file as there are now quite a few. Tests: LayerTreeHostCopyRequestTestCreatesTexture LayerTreeHostCopyRequestTestProvideTexture R=piman@chromium.org BUG=312497 Review URL: https://codereview.chromium.org/99253004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238324 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.h7
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 f8d17c7..54cf543 100644
--- a/cc/test/test_web_graphics_context_3d.h
+++ b/cc/test/test_web_graphics_context_3d.h
@@ -158,6 +158,11 @@ class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D {
blink::WGC3Denum access);
virtual void unmapImageCHROMIUM(blink::WGC3Duint image_id);
+ virtual unsigned insertSyncPoint() OVERRIDE;
+ virtual void waitSyncPoint(unsigned sync_point) OVERRIDE;
+
+ unsigned last_waited_sync_point() const { return last_waited_sync_point_; }
+
const ContextProvider::Capabilities& test_capabilities() const {
return test_capabilities_;
}
@@ -352,6 +357,8 @@ class TestWebGraphicsContext3D : public FakeWebGraphicsContext3D {
TestContextSupport* test_support_;
gfx::Rect update_rect_;
UpdateType last_update_type_;
+ unsigned next_insert_sync_point_;
+ unsigned last_waited_sync_point_;
unsigned bound_buffer_;
TextureTargets texture_targets_;