diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-14 21:27:42 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-14 21:27:42 +0000 |
commit | d8f0b2d5f854cde9556fb4a9bc1a61e636aeba8e (patch) | |
tree | 76a2e23671ee3cc1d3399e701f9bfbcc0a20bc7b /content/common/gpu/image_transport_surface.h | |
parent | 6a9361218553ed2eecd22eab8127597bc96a0fec (diff) | |
download | chromium_src-d8f0b2d5f854cde9556fb4a9bc1a61e636aeba8e.zip chromium_src-d8f0b2d5f854cde9556fb4a9bc1a61e636aeba8e.tar.gz chromium_src-d8f0b2d5f854cde9556fb4a9bc1a61e636aeba8e.tar.bz2 |
Move vsync logic to the surface type
This should be a noop right now, but will allow setting vsync differently
between different surfaces (e.g. transport vs main) instead of based on an
ifdef.
BUG=99516
TEST=run with/without --disable-gpu-vsync, on both aura and regular, on poster circle and watch frame rate
Review URL: http://codereview.chromium.org/9389031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121940 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/gpu/image_transport_surface.h')
-rw-r--r-- | content/common/gpu/image_transport_surface.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/content/common/gpu/image_transport_surface.h b/content/common/gpu/image_transport_surface.h index bd013f3..0664df0 100644 --- a/content/common/gpu/image_transport_surface.h +++ b/content/common/gpu/image_transport_surface.h @@ -109,6 +109,9 @@ class ImageTransportHelper : public IPC::Channel::Listener { // Make the surface's context current. bool MakeCurrent(); + // Set the default swap interval on the surface. + void SetSwapInterval(); + void Suspend(); private: @@ -124,9 +127,6 @@ class ImageTransportHelper : public IPC::Channel::Listener { // Backbuffer resize callback. void Resize(gfx::Size size); - // Set the default swap interval on the surface. - void SetSwapInterval(); - // Weak pointers that point to objects that outlive this helper. ImageTransportSurface* surface_; GpuChannelManager* manager_; @@ -155,6 +155,7 @@ class PassThroughImageTransportSurface virtual void Destroy() OVERRIDE; virtual bool SwapBuffers() OVERRIDE; virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; + virtual bool OnMakeCurrent(gfx::GLContext* context) OVERRIDE; // ImageTransportSurface implementation. virtual void OnNewSurfaceACK( @@ -168,6 +169,7 @@ class PassThroughImageTransportSurface scoped_ptr<ImageTransportHelper> helper_; gfx::Size new_size_; bool transport_; + bool did_set_swap_interval_; DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); }; |