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

Unified Diff: cc/surfaces/display.h

Issue 2527283003: cc: Introduce BeginFrame sequence numbers and acknowledgements.
Patch Set: Address Brian's comments. Created 4 years 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/surfaces/direct_compositor_frame_sink_unittest.cc ('k') | cc/surfaces/display.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display.h
diff --git a/cc/surfaces/display.h b/cc/surfaces/display.h
index a91ae09938d8d3d30673299793d2a7ce449492a6..5fa461eabd24cbea2def4c902c5aa86cb8e32757 100644
--- a/cc/surfaces/display.h
+++ b/cc/surfaces/display.h
@@ -11,7 +11,6 @@
#include "base/macros.h"
#include "cc/output/output_surface_client.h"
#include "cc/resources/returned_resource.h"
-#include "cc/scheduler/begin_frame_source.h"
#include "cc/surfaces/display_scheduler.h"
#include "cc/surfaces/frame_sink_id.h"
#include "cc/surfaces/surface_aggregator.h"
@@ -34,6 +33,7 @@ namespace cc {
class BeginFrameSource;
class DirectRenderer;
+class DisplayBeginFrameSource;
class DisplayClient;
class OutputSurface;
class RendererSettings;
@@ -95,6 +95,13 @@ class CC_SURFACES_EXPORT Display : public DisplaySchedulerClient,
void ForceImmediateDrawAndSwapIfPossible();
+ // Swap the Display's current BeginFrameSource with the provided one. The
+ // provided unique_ptr will be updated to point to the previous source. Used
+ // to set an ExternalBeginFrameSource for manual control over BeginFrames
+ // through DevTools.
+ void SwapBeginFrameSource(
+ std::unique_ptr<BeginFrameSource>* begin_frame_source);
+
private:
void InitializeRenderer();
void UpdateRootSurfaceResourcesLocked();
@@ -117,7 +124,7 @@ class CC_SURFACES_EXPORT Display : public DisplaySchedulerClient,
// The begin_frame_source_ is often known by the output_surface_ and
// the scheduler_.
- std::unique_ptr<BeginFrameSource> begin_frame_source_;
+ std::unique_ptr<DisplayBeginFrameSource> begin_frame_source_;
std::unique_ptr<OutputSurface> output_surface_;
std::unique_ptr<DisplayScheduler> scheduler_;
std::unique_ptr<ResourceProvider> resource_provider_;
« no previous file with comments | « cc/surfaces/direct_compositor_frame_sink_unittest.cc ('k') | cc/surfaces/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698