Skip to content

Commit

Permalink
gpu: Don't call SetSwapInterval() for NullTransportSurface
Browse files Browse the repository at this point in the history
BUG=419876

Review URL: https://codereview.chromium.org/649773002

Cr-Commit-Position: refs/heads/master@{#299199}
  • Loading branch information
sievers authored and Commit bot committed Oct 10, 2014
1 parent 1850ee0 commit 5abc49e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions content/common/gpu/null_transport_surface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,10 @@ void NullTransportSurface::SendVSyncUpdateIfAvailable() {
NOTREACHED();
}

bool NullTransportSurface::OnMakeCurrent(gfx::GLContext* context) {
// Override PassThroughImageTransportSurface default behavior which
// sets the swap interval.
return true;
}

} // namespace content
3 changes: 2 additions & 1 deletion content/common/gpu/null_transport_surface.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ class NullTransportSurface : public PassThroughImageTransportSurface {
GpuCommandBufferStub* stub,
const gfx::GLSurfaceHandle& handle);

// gfx::GLSurface implementation.
// gfx::GLSurfaceAdapter implementation.
virtual bool Initialize() override;
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;

protected:
virtual ~NullTransportSurface();
Expand Down

0 comments on commit 5abc49e

Please sign in to comment.