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

Unified Diff: cc/surfaces/compositor_frame_sink_support_unittest.cc

Issue 2807653003: Move Work From CompositorFrameSinkSupport() To Init() (Closed)
Patch Set: Set needs_sync_points Created 3 years, 8 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_unittest.cc
diff --git a/cc/surfaces/compositor_frame_sink_support_unittest.cc b/cc/surfaces/compositor_frame_sink_support_unittest.cc
index 319471a9296c4d5b16daf5527727ca74d117b386..a081d6c8096fc776acda0739c93e3d0084a38137 100644
--- a/cc/surfaces/compositor_frame_sink_support_unittest.cc
+++ b/cc/surfaces/compositor_frame_sink_support_unittest.cc
@@ -180,27 +180,31 @@ class CompositorFrameSinkSupportTest : public testing::Test {
// testing::Test:
void SetUp() override {
testing::Test::SetUp();
+ constexpr bool is_root = true;
+ constexpr bool is_child_root = false;
+ constexpr bool handles_frame_sink_id_invalidation = true;
+ constexpr bool needs_sync_points = true;
begin_frame_source_ =
base::MakeUnique<FakeExternalBeginFrameSource>(0.f, false);
surface_manager_.SetDependencyTracker(
base::MakeUnique<SurfaceDependencyTracker>(&surface_manager_,
begin_frame_source_.get()));
supports_.push_back(base::MakeUnique<CompositorFrameSinkSupport>(
- &support_client_, &surface_manager_, kDisplayFrameSink,
- true /* is_root */, true /* handles_frame_sink_id_invalidation */,
- true /* needs_sync_points */));
+ &support_client_, kDisplayFrameSink, is_root,
+ handles_frame_sink_id_invalidation));
+ supports_.back()->Init(&surface_manager_, needs_sync_points);
supports_.push_back(base::MakeUnique<CompositorFrameSinkSupport>(
- &support_client_, &surface_manager_, kParentFrameSink,
- false /* is_root */, true /* handles_frame_sink_id_invalidation */,
- true /* needs_sync_points */));
+ &support_client_, kParentFrameSink, is_child_root,
+ handles_frame_sink_id_invalidation));
+ supports_.back()->Init(&surface_manager_, needs_sync_points);
supports_.push_back(base::MakeUnique<CompositorFrameSinkSupport>(
- &support_client_, &surface_manager_, kChildFrameSink1,
- false /* is_root */, true /* handles_frame_sink_id_invalidation */,
- true /* needs_sync_points */));
+ &support_client_, kChildFrameSink1, is_child_root,
+ handles_frame_sink_id_invalidation));
+ supports_.back()->Init(&surface_manager_, needs_sync_points);
supports_.push_back(base::MakeUnique<CompositorFrameSinkSupport>(
- &support_client_, &surface_manager_, kChildFrameSink2,
- false /* is_root */, true /* handles_frame_sink_id_invalidation */,
- true /* needs_sync_points */));
+ &support_client_, kChildFrameSink2, is_child_root,
+ handles_frame_sink_id_invalidation));
+ supports_.back()->Init(&surface_manager_, needs_sync_points);
// Normally, the BeginFrameSource would be registered by the Display. We
// register it here so that BeginFrames are received by the display support,

Powered by Google App Engine
This is Rietveld 408576698