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

Unified Diff: cc/surfaces/display.h

Issue 2411793008: Adds BeginFrameControl via DevTools.
Patch Set: BFC prototype v2 with allow_latency_opts and waiting for BFOs. Created 4 years, 1 month 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/BUILD.gn ('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 7050fff425de215eeaf1ad203a5b836999f5a42a..4ce4215d007d579a6fdfeea1594e8b3ab0a8b6de 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;
@@ -98,6 +98,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();
@@ -120,7 +127,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/BUILD.gn ('k') | cc/surfaces/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698