Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5402)

Unified Diff: cc/test/fake_output_surface.cc

Issue 16430005: Call OnSwapBuffersComplete at the end of each frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tidy Begin/End Paint Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/test/fake_output_surface.cc
diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc
index 6c5bc9f849d0fc95ec0b7c4637aeb04c4c35a036..b32897b5734208573b77024bc85ce9ff40c3ca93 100644
--- a/cc/test/fake_output_surface.cc
+++ b/cc/test/fake_output_surface.cc
@@ -41,6 +41,16 @@ void FakeOutputSurface::SendFrameToParentCompositor(
weak_ptr_factory_.GetWeakPtr()));
}
+void FakeOutputSurface::SwapBuffers(const ui::LatencyInfo& latency_info) {
+ if (ForcedDrawToSoftwareDevice() || !context3d()) {
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE, base::Bind(&OutputSurfaceClient::OnSwapBuffersComplete,
+ base::Unretained(client_)));
+ } else {
+ OutputSurface::SwapBuffers(latency_info);
+ }
+}
+
void FakeOutputSurface::SetNeedsBeginFrame(bool enable) {
needs_begin_frame_ = enable;
}
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | content/browser/android/in_process/synchronous_compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698