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

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

Issue 23513012: Aura: fix full-screen Flash with delegated renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more comments Created 7 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 261278f41e864312101a6f23f7748481b62ed215..ce6e0fe955b6cbea25bd71ad2f89100d6a83d87b 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -649,6 +649,7 @@ RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host)
text_input_type_(ui::TEXT_INPUT_TYPE_NONE),
can_compose_inline_(true),
has_composition_text_(false),
+ last_output_surface_id_(0),
last_swapped_surface_scale_factor_(1.f),
paint_canvas_(NULL),
synthetic_move_sent_(false),
@@ -1459,6 +1460,17 @@ void RenderWidgetHostViewAura::SwapDelegatedFrame(
host_->GetProcess()->GetID(), ack);
return;
}
+ if (output_surface_id != last_output_surface_id_) {
+ // Resource ids are scoped by the output surface.
+ // If the originating output surface doesn't match the last one, it
+ // indicates the renderer's output surface may have been recreated, in which
+ // case we should recreate the DelegatedRendererLayer, to avoid matching
+ // resources from the old one with resources from the new one which would
+ // have the same id.
+ window_->layer()->SetDelegatedFrame(scoped_ptr<cc::DelegatedFrameData>(),
+ frame_size_in_dip);
+ last_output_surface_id_ = output_surface_id;
+ }
window_->layer()->SetDelegatedFrame(frame_data.Pass(), frame_size_in_dip);
released_front_lock_ = NULL;
current_frame_size_ = frame_size_in_dip;
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698