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

Unified Diff: ui/aura/mus/window_port_mus.cc

Issue 2780043002: Aura-Mus: Allocate a LocalSurfaceId on size change (Closed)
Patch Set: Created 3 years, 9 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: ui/aura/mus/window_port_mus.cc
diff --git a/ui/aura/mus/window_port_mus.cc b/ui/aura/mus/window_port_mus.cc
index 1ad03c8900ca322f41f9a2f32b1493dea0c1f3bd..1da946e3a821bebf666674f4b8556dbb31103f98 100644
--- a/ui/aura/mus/window_port_mus.cc
+++ b/ui/aura/mus/window_port_mus.cc
@@ -283,6 +283,26 @@ void WindowPortMus::SetFrameSinkIdFromServer(
// then we are ready to embed.
}
+const cc::LocalSurfaceId& WindowPortMus::GetLocalSurfaceId() {
+ return local_surface_id_;
+}
+
+const cc::LocalSurfaceId& WindowPortMus::GetOrAllocateLocalSurfaceId(
+ const gfx::Size& surface_size) {
+ if (last_surface_size_ == surface_size && local_surface_id_.is_valid())
+ return local_surface_id_;
+
+ local_surface_id_ = local_surface_id_allocator_.GenerateId();
+ last_surface_size_ = surface_size;
+
+ // TODO(fsamuel): If surface synchronization is enabled and the FrameSinkId
+ // is available, then immediately embed the SurfaceId. The newly generated
+ // frame by the embedder will block in the display compositor until the
+ // child submits a corresponding CompositorFrame or a deadline hits.
+
+ return local_surface_id_;
+}
+
void WindowPortMus::SetSurfaceInfoFromServer(
const cc::SurfaceInfo& surface_info) {
if (surface_info_.is_valid()) {

Powered by Google App Engine
This is Rietveld 408576698