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

Unified Diff: content/browser/renderer_host/delegated_frame_host.cc

Issue 2383263002: Generalize layer mirroring for phantom windows (Closed)
Patch Set: Created 4 years, 3 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/browser/renderer_host/delegated_frame_host.cc
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc
index 268d45bd683a19b8e912a22c11363739bb656219..ca282ff89f521ffdd5086aaf76d8bbb729c7172c 100644
--- a/content/browser/renderer_host/delegated_frame_host.cc
+++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -897,10 +897,14 @@ void DelegatedFrameHost::OnLayerRecreated(ui::Layer* old_layer,
// The new_layer is the one that will be used by our Window, so that's the one
// that should keep our frame. old_layer will be returned to the
// RecreateLayer caller, and should have a copy.
+ OnLayerMirrored(new_layer);
+}
+
+void DelegatedFrameHost::OnLayerMirrored(ui::Layer* mirror) {
if (!surface_id_.is_null()) {
ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
cc::SurfaceManager* manager = factory->GetSurfaceManager();
- new_layer->SetShowSurface(
+ mirror->SetShowSurface(
surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)),
base::Bind(&RequireCallback, base::Unretained(manager)),
current_surface_size_, current_scale_factor_,

Powered by Google App Engine
This is Rietveld 408576698