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

Unified Diff: services/ui/surfaces/display_compositor.cc

Issue 2715663007: Implement temporary reference assignment with DisplayCompositor. (Closed)
Patch Set: Rebase. Created 3 years, 10 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: services/ui/surfaces/display_compositor.cc
diff --git a/services/ui/surfaces/display_compositor.cc b/services/ui/surfaces/display_compositor.cc
index 6ddd4433008118ea9ef1128e251449643f8f5528..4809c17ecd249f7665ecb92f145d96d67355817e 100644
--- a/services/ui/surfaces/display_compositor.cc
+++ b/services/ui/surfaces/display_compositor.cc
@@ -103,6 +103,11 @@ void DisplayCompositor::UnregisterFrameSinkHierarchy(
child_frame_sink_id);
}
+void DisplayCompositor::DropTemporaryReference(
+ const cc::SurfaceId& surface_id) {
+ manager_.DropTemporaryReference(surface_id);
+}
+
std::unique_ptr<cc::Display> DisplayCompositor::CreateDisplay(
const cc::FrameSinkId& frame_sink_id,
gpu::SurfaceHandle surface_handle,
@@ -158,6 +163,11 @@ void DisplayCompositor::OnSurfaceCreated(const cc::SurfaceInfo& surface_info) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK_GT(surface_info.device_scale_factor(), 0.0f);
+ // TODO(kylechar): |client_| will try to find an owner for the temporary
+ // reference to the new surface. With surface synchronization this might not
+ // be necessary, because a surface reference might already exist and no
+ // temporary reference was created. It could be useful to let |client_| know
+ // if it should find an owner.
if (client_)
client_->OnSurfaceCreated(surface_info);
}
« no previous file with comments | « services/ui/surfaces/display_compositor.h ('k') | services/ui/ws/server_window_compositor_frame_sink_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698