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

Unified Diff: cc/test/fake_output_surface.cc

Issue 12674030: cc: Hook vsync time source to output surface (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Review tweaks. Created 7 years, 9 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
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_output_surface.cc
diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_output_surface.cc
index 0b9a6d3dd98d3fd65febf22d8343cfaf078bed9d..6369f61ec6740c4e7bb0c9d53617e5443dadd926 100644
--- a/cc/test/fake_output_surface.cc
+++ b/cc/test/fake_output_surface.cc
@@ -4,12 +4,15 @@
#include "cc/test/fake_output_surface.h"
+#include "cc/output/output_surface_client.h"
+
namespace cc {
FakeOutputSurface::FakeOutputSurface(
scoped_ptr<WebKit::WebGraphicsContext3D> context3d, bool has_parent)
: OutputSurface(context3d.Pass()),
- num_sent_frames_(0) {
+ num_sent_frames_(0),
+ vsync_notification_enabled_(false) {
capabilities_.has_parent_compositor = has_parent;
}
@@ -37,4 +40,12 @@ void FakeOutputSurface::SendFrameToParentCompositor(
++num_sent_frames_;
}
+void FakeOutputSurface::EnableVSyncNotification(bool enable) {
+ vsync_notification_enabled_ = enable;
+}
+
+void FakeOutputSurface::DidVSync(base::TimeTicks frame_time) {
+ client_->DidVSync(frame_time);
+}
+
} // namespace cc
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698