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

Unified Diff: cc/test/test_compositor_frame_sink.cc

Issue 2387333003: cc: Set sync token on resource even if context is lost. (Closed)
Patch Set: test Created 4 years, 2 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/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_);

Powered by Google App Engine
This is Rietveld 408576698