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

Unified Diff: ui/compositor/compositor.cc

Issue 2582653002: ui::Compositor needs a valid FrameSinkId even when it doesn't have ContextFactoryPrivate. (Closed)
Patch Set: Fix TODO 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index f2d08cde512820fb5ea9af028f7e25811b276e4d..42002d7553d94df4eee98c8c262219914f84483f 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -46,6 +46,13 @@ namespace {
const double kDefaultRefreshRate = 60.0;
const double kTestRefreshRate = 200.0;
+// TODO(mfomitchev, fsamuel): Look at removing this when transition from
+// SurfaceSequence to SurfaceReference is fully complete.
+// Used when ui::Compositor is created with null ContextFactoryPrivate.
+// Compositor needs a valid FrameSinkId, so that cc::SurfaceLayer can create
+// valid SurfaceSequences.
+constexpr cc::FrameSinkId kDefaultFrameSinkId(1, 1);
+
} // namespace
namespace ui {
@@ -85,7 +92,7 @@ Compositor::Compositor(ui::ContextFactory* context_factory,
compositor_frame_sink_requested_(false),
frame_sink_id_(context_factory_private
? context_factory_private->AllocateFrameSinkId()
- : cc::FrameSinkId()),
+ : kDefaultFrameSinkId),
task_runner_(task_runner),
vsync_manager_(new CompositorVSyncManager()),
device_scale_factor_(0.0f),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698