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

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

Issue 2848273002: Aura-Mus: Avoid creating StubSurfaceReferenceFactory's on every surface ID change (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « ui/aura/mus/client_surface_embedder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/client_surface_embedder.cc
diff --git a/ui/aura/mus/client_surface_embedder.cc b/ui/aura/mus/client_surface_embedder.cc
index e04a77b22ea0fb7bca2623fc7a737d362fd2427d..94ad333da35c65548becc266d33d6c1deaeb255f 100644
--- a/ui/aura/mus/client_surface_embedder.cc
+++ b/ui/aura/mus/client_surface_embedder.cc
@@ -46,14 +46,14 @@ ClientSurfaceEmbedder::ClientSurfaceEmbedder(
// this is the case with window decorations provided by Window Manager.
// This content should appear underneath the content of the embedded client.
window_->layer()->StackAtTop(surface_layer_.get());
+ ref_factory_ = new StubSurfaceReferenceFactory();
}
ClientSurfaceEmbedder::~ClientSurfaceEmbedder() = default;
void ClientSurfaceEmbedder::SetPrimarySurfaceInfo(
const cc::SurfaceInfo& surface_info) {
- surface_layer_->SetShowPrimarySurface(
- surface_info, make_scoped_refptr(new StubSurfaceReferenceFactory));
+ surface_layer_->SetShowPrimarySurface(surface_info, ref_factory_);
surface_layer_->SetBounds(gfx::Rect(window_->bounds().size()));
}
« no previous file with comments | « ui/aura/mus/client_surface_embedder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698