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

Unified Diff: cc/test/fake_output_surface_client.h

Issue 577643002: Making OutputSurface a begin frame source and vsync source. (Closed)
Patch Set: Created 6 years, 3 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.cc ('k') | cc/test/fake_output_surface_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_output_surface_client.h
diff --git a/cc/test/fake_output_surface_client.h b/cc/test/fake_output_surface_client.h
index 7ecb6cf2b73c4be47611a0ad4ce20ea893a204f8..433d542fa6e8dbd14b10b84dec7319d79c91a648 100644
--- a/cc/test/fake_output_surface_client.h
+++ b/cc/test/fake_output_surface_client.h
@@ -12,28 +12,16 @@ namespace cc {
class OutputSurface;
-class FakeOutputSurfaceClient : public OutputSurfaceClient {
+class FakeOutputSurfaceClient : public OutputSurfaceClient,
+ public BeginFrameObserver {
public:
- FakeOutputSurfaceClient()
- : output_surface_(NULL),
- begin_frame_count_(0),
- deferred_initialize_called_(false),
- did_lose_output_surface_called_(false),
- memory_policy_(0) {}
-
- explicit FakeOutputSurfaceClient(OutputSurface* output_surface)
- : output_surface_(output_surface),
- begin_frame_count_(0),
- deferred_initialize_called_(false),
- did_lose_output_surface_called_(false),
- memory_policy_(0) {}
+ FakeOutputSurfaceClient();
+ explicit FakeOutputSurfaceClient(OutputSurface* output_surface);
+ // OutputSurfaceClient
virtual void DeferredInitialize() OVERRIDE;
virtual void ReleaseGL() OVERRIDE;
- virtual void CommitVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval) OVERRIDE {}
virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) OVERRIDE {}
- virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE;
virtual void DidSwapBuffers() OVERRIDE {}
virtual void DidSwapBuffersComplete() OVERRIDE {}
virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE {}
@@ -48,6 +36,13 @@ class FakeOutputSurfaceClient : public OutputSurfaceClient {
virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE;
virtual void SetTreeActivationCallback(const base::Closure&) OVERRIDE {}
+ // BeginFrameObserver
+ virtual void OnBeginFrame(const BeginFrameArgs& args) OVERRIDE;
+ virtual const BeginFrameArgs& LastBeginFrameArgs() const OVERRIDE;
+
+ // Tracing support
+ virtual void AsValueInto(base::debug::TracedValue* dict) const OVERRIDE;
+
int begin_frame_count() { return begin_frame_count_; }
bool deferred_initialize_called() {
@@ -63,6 +58,7 @@ class FakeOutputSurfaceClient : public OutputSurfaceClient {
private:
OutputSurface* output_surface_;
int begin_frame_count_;
+ BeginFrameArgs last_begin_frame_args_;
bool deferred_initialize_called_;
bool did_lose_output_surface_called_;
ManagedMemoryPolicy memory_policy_;
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | cc/test/fake_output_surface_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698