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

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: 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
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..621c33ff42aee35a8604086ab819c6fd2e8bae61 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,16 @@ void RenderWidgetHostViewAura::SwapDelegatedFrame(
host_->GetProcess()->GetID(), ack);
return;
}
+ if (output_surface_id != last_output_surface_id_) {
+ // If the originating output surface doesn't match the last one, it
+ // indicates the renderer's compositor may have been recreated, in which
danakj 2013/09/04 13:07:51 This mentions the compositor being recreated, but
piman 2013/09/04 21:45:02 Done.
+ // 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;

Powered by Google App Engine
This is Rietveld 408576698