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

Unified Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 1199963011: Force new surface on BrowserPluginGuest reattach. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename & move ClearCompositorSurfaceIfNecessary(). Created 5 years, 6 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/frame_host/render_widget_host_view_child_frame.cc
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index 8be87ea534e50001aea2e9176ce6b34c0ebfb4a5..ae915a92815473b5435ea2640f3b5b7c4c784c13 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -250,9 +250,7 @@ void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame(
if (output_surface_id != last_output_surface_id_ ||
frame_size != current_surface_size_ ||
scale_factor != current_surface_scale_factor_) {
- if (surface_factory_ && !surface_id_.is_null())
- surface_factory_->Destroy(surface_id_);
- surface_id_ = cc::SurfaceId();
+ ClearCompositorSurfaceIfNecessary();
last_output_surface_id_ = output_surface_id;
current_surface_size_ = frame_size;
current_surface_scale_factor_ = scale_factor;
@@ -418,4 +416,10 @@ RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager(
BrowserAccessibilityManager::GetEmptyDocument(), delegate);
}
+void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() {
+ if (surface_factory_ && !surface_id_.is_null())
+ surface_factory_->Destroy(surface_id_);
lazyboy 2015/06/26 18:03:21 nit: indent
wjmaclean 2015/06/27 16:30:58 Done.
+ surface_id_ = cc::SurfaceId();
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698