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

Unified Diff: cc/surfaces/compositor_frame_sink_support.h

Issue 2854163003: [cc] Plumb BeginFrameAcks through SurfaceManager to DisplayScheduler. (Closed)
Patch Set: Track state per surface. Created 3 years, 7 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/surfaces/compositor_frame_sink_support.h
diff --git a/cc/surfaces/compositor_frame_sink_support.h b/cc/surfaces/compositor_frame_sink_support.h
index 5eda4c0feb63e4c7588f750d37dc89058e8f60f1..a0513fee635aefbe1280494682b98dfe700e6ad7 100644
--- a/cc/surfaces/compositor_frame_sink_support.h
+++ b/cc/surfaces/compositor_frame_sink_support.h
@@ -13,8 +13,10 @@
#include "base/memory/weak_ptr.h"
#include "cc/output/compositor_frame.h"
#include "cc/scheduler/begin_frame_source.h"
+#include "cc/surfaces/frame_sink_manager.h"
#include "cc/surfaces/frame_sink_manager_client.h"
#include "cc/surfaces/referenced_surface_tracker.h"
+#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surface_resource_holder.h"
#include "cc/surfaces/surface_resource_holder_client.h"
@@ -23,7 +25,6 @@
namespace cc {
class CompositorFrameSinkSupportClient;
-class Surface;
class SurfaceManager;
class CC_SURFACES_EXPORT CompositorFrameSinkSupport
@@ -104,6 +105,7 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
const BeginFrameArgs& LastUsedBeginFrameArgs() const override;
void OnBeginFrameSourcePausedChanged(bool paused) override;
+ void SetProducerState(Surface::ProducerState state);
void UpdateNeedsBeginFramesInternal();
std::unique_ptr<Surface> CreateSurface(
const LocalSurfaceId& local_surface_id);
@@ -129,6 +131,13 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
// The last begin frame args generated by the begin frame source.
BeginFrameArgs last_begin_frame_args_;
+ // The last BeginFrameAck sent by the client.
+ BeginFrameAck last_begin_frame_ack_;
+
+ // Our current CompositorFrame producer state. This is also propagated to the
+ // current_surface_, if it exists.
+ Surface::ProducerState producer_state_ = Surface::IDLE;
+
// Whether a request for begin frames has been issued.
bool needs_begin_frame_ = false;
« no previous file with comments | « no previous file | cc/surfaces/compositor_frame_sink_support.cc » ('j') | cc/surfaces/compositor_frame_sink_support.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698