Index: cc/test/test_compositor_frame_sink.cc |
diff --git a/cc/test/test_compositor_frame_sink.cc b/cc/test/test_compositor_frame_sink.cc |
index 1037fba98a6a5c9c482c9f7985c795b92cb919ba..a77917e7b663f0edf18808860c7b89c0356a8f33 100644 |
--- a/cc/test/test_compositor_frame_sink.cc |
+++ b/cc/test/test_compositor_frame_sink.cc |
@@ -53,7 +53,7 @@ TestCompositorFrameSink::TestCompositorFrameSink( |
begin_frame_source.get(), task_runner, |
display_output_surface->capabilities().max_frames_pending)); |
} |
- const bool context_shared_with_compositor = |
+ display_context_shared_with_compositor_ = |
display_output_surface->context_provider() == context_provider(); |
display_.reset( |
new Display(shared_bitmap_manager, gpu_memory_buffer_manager, |
@@ -66,8 +66,7 @@ TestCompositorFrameSink::TestCompositorFrameSink( |
// the Display. But we allow tests to disable this to mimic an out-of-process |
// Display. |
capabilities_.can_force_reclaim_resources = !force_disable_reclaim_resources; |
- capabilities_.delegated_sync_points_required = |
- !context_shared_with_compositor; |
+ capabilities_.delegated_sync_points_required = true; |
danakj
2016/10/06 20:50:35
Can you leave a comment explaining why this is bei
sunnyps
2016/10/06 21:31:53
Done.
|
} |
TestCompositorFrameSink::~TestCompositorFrameSink() { |
@@ -84,10 +83,9 @@ bool TestCompositorFrameSink::BindToClient(CompositorFrameSinkClient* client) { |
return false; |
// We want the Display's OutputSurface to hear about lost context, and since |
danakj
2016/10/06 20:50:35
and when this shares
sunnyps
2016/10/06 21:31:53
Done.
|
- // this shares a context with it (when delegated_sync_points_required is |
- // false), we should not be listening for lost context callbacks on the |
- // context here. |
- if (!capabilities_.delegated_sync_points_required && context_provider()) |
+ // this shares a context with it we should not be listening for lost context |
+ // callbacks on the context here. |
+ if (display_context_shared_with_compositor_ && context_provider()) |
context_provider()->SetLostContextCallback(base::Closure()); |
surface_manager_->RegisterFrameSinkId(frame_sink_id_); |