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

Unified Diff: content/renderer/mus/renderer_window_tree_client.cc

Issue 2778363002: Mus-WS / Aura-Mus: Propagate LocalSurfaceId on WindowTreeHost creation (Closed)
Patch Set: Add comments 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: content/renderer/mus/renderer_window_tree_client.cc
diff --git a/content/renderer/mus/renderer_window_tree_client.cc b/content/renderer/mus/renderer_window_tree_client.cc
index e6b1e895e82447ea24df056eae3d75c5955a5d6f..f77a1c0aa96f4e3b92ce853e6c2160c64fec62e8 100644
--- a/content/renderer/mus/renderer_window_tree_client.cc
+++ b/content/renderer/mus/renderer_window_tree_client.cc
@@ -107,13 +107,15 @@ void RendererWindowTreeClient::DestroySelf() {
delete this;
}
-void RendererWindowTreeClient::OnEmbed(ui::ClientSpecificId client_id,
- ui::mojom::WindowDataPtr root,
- ui::mojom::WindowTreePtr tree,
- int64_t display_id,
- ui::Id focused_window_id,
- bool drawn,
- const cc::FrameSinkId& frame_sink_id) {
+void RendererWindowTreeClient::OnEmbed(
+ ui::ClientSpecificId client_id,
+ ui::mojom::WindowDataPtr root,
+ ui::mojom::WindowTreePtr tree,
+ int64_t display_id,
+ ui::Id focused_window_id,
+ bool drawn,
+ const cc::FrameSinkId& frame_sink_id,
+ const base::Optional<cc::LocalSurfaceId>& local_surface_id) {
frame_sink_id_ = frame_sink_id;
root_window_id_ = root->window_id;
tree_ = std::move(tree);
@@ -125,6 +127,10 @@ void RendererWindowTreeClient::OnEmbed(ui::ClientSpecificId client_id,
pending_gpu_memory_buffer_manager_ = nullptr;
pending_compositor_frame_sink_callback_.Reset();
}
+ if (local_surface_id) {
+ // TODO(fsamuel): Update the RenderWidgetCompositor's LocalSurfaceId.
+ current_local_surface_id_ = *local_surface_id;
+ }
}
void RendererWindowTreeClient::OnEmbeddedAppDisconnected(ui::Id window_id) {
@@ -151,7 +157,8 @@ void RendererWindowTreeClient::OnTopLevelCreated(
ui::mojom::WindowDataPtr data,
int64_t display_id,
bool drawn,
- const cc::FrameSinkId& frame_sink_id) {
+ const cc::FrameSinkId& frame_sink_id,
+ const base::Optional<cc::LocalSurfaceId>& local_surface_id) {
NOTREACHED();
}
@@ -160,7 +167,7 @@ void RendererWindowTreeClient::OnWindowBoundsChanged(
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds,
const base::Optional<cc::LocalSurfaceId>& local_surface_id) {
- if (!enable_surface_synchronization_)
+ if (!enable_surface_synchronization_ || !local_surface_id)
return;
current_local_surface_id_ = *local_surface_id;
RenderWidget* widget = GetRenderWidgetFromRoutingId(routing_id_);
« no previous file with comments | « content/renderer/mus/renderer_window_tree_client.h ('k') | services/ui/public/interfaces/window_manager.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698