diff options
author | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-25 23:31:17 +0000 |
---|---|---|
committer | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-25 23:31:17 +0000 |
commit | 68c7028076c499ac5af9af6b8bf2660c62b997b4 (patch) | |
tree | d3daa201a7bad7bfe5029ba84199fa80b8a9db3d /content/common/gpu/texture_image_transport_surface.h | |
parent | 4a25b54d725f60367020d1ee3f302125fcbd8458 (diff) | |
download | chromium_src-68c7028076c499ac5af9af6b8bf2660c62b997b4.zip chromium_src-68c7028076c499ac5af9af6b8bf2660c62b997b4.tar.gz chromium_src-68c7028076c499ac5af9af6b8bf2660c62b997b4.tar.bz2 |
Aura: Use SyncPoints instead of waiting for OnCompositingEnded
When an new frame comes in from a renderer, we do a pointer flip from an old to a new renderer texture. Previously, We waited until the next UI frame cleared (via OnCompositingEnded) before ACKing the renderer. This ensured that there were no pending UI GL calls in the pipeline referring to the old renderer texture.
With this CL, we ACK the renderer once we have kicked the frame (a form of flow control ensuring that the renderer does not race ahead of the UI) and use a SyncPoint in the GPU process to make sure all the pipelined UI draw calls have cleared before processing more renderer draw calls.
TEST=none
BUG=112299
Review URL: https://chromiumcodereview.appspot.com/10576015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144053 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/gpu/texture_image_transport_surface.h')
-rw-r--r-- | content/common/gpu/texture_image_transport_surface.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/content/common/gpu/texture_image_transport_surface.h b/content/common/gpu/texture_image_transport_surface.h index 82aeac9..a321f68 100644 --- a/content/common/gpu/texture_image_transport_surface.h +++ b/content/common/gpu/texture_image_transport_surface.h @@ -7,6 +7,7 @@ #pragma once #include "base/basictypes.h" +#include "base/memory/weak_ptr.h" #include "content/common/gpu/gpu_command_buffer_stub.h" #include "content/common/gpu/image_transport_surface.h" #include "gpu/command_buffer/service/texture_manager.h" @@ -17,7 +18,8 @@ class GpuChannelManager; class TextureImageTransportSurface : public ImageTransportSurface, public GpuCommandBufferStub::DestructionObserver, - public gfx::GLSurface { + public gfx::GLSurface, + public base::SupportsWeakPtr<TextureImageTransportSurface> { public: TextureImageTransportSurface(GpuChannelManager* manager, GpuCommandBufferStub* stub, @@ -46,7 +48,8 @@ class TextureImageTransportSurface : // ImageTransportSurface implementation. virtual void OnNewSurfaceACK( uint64 surface_handle, TransportDIB::Handle shm_handle) OVERRIDE; - virtual void OnBufferPresented() OVERRIDE; + virtual void OnBufferPresented( + uint32 sync_point) OVERRIDE; virtual void OnResizeViewACK() OVERRIDE; virtual void OnResize(gfx::Size size) OVERRIDE; @@ -77,6 +80,7 @@ class TextureImageTransportSurface : void ReleaseBackTexture(); void AttachBackTextureToFBO(); void ReleaseParentStub(); + void BufferPresentedImpl(); int back() const { return 1 - front_; } // The framebuffer that represents this surface (service id). Allocated lazily |