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_; |