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 09d3d37d53c1d0784b864f1f20bdd7364ea9e411..cdf795246d19a47000f18b950eabc100767a5634 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 |
@@ -66,9 +66,6 @@ RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame( |
} |
RenderWidgetHostViewChildFrame::~RenderWidgetHostViewChildFrame() { |
- if (!local_frame_id_.is_null()) |
- surface_factory_->Destroy(local_frame_id_); |
- |
if (GetSurfaceManager()) |
GetSurfaceManager()->InvalidateFrameSinkId(frame_sink_id_); |
} |
@@ -386,7 +383,6 @@ void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame( |
// frame renderer has changed its output surface, or size, or scale factor. |
if (compositor_frame_sink_id != last_compositor_frame_sink_id_ && |
surface_factory_) { |
- surface_factory_->Destroy(local_frame_id_); |
surface_factory_.reset(); |
} |
if (compositor_frame_sink_id != last_compositor_frame_sink_id_ || |
@@ -406,7 +402,9 @@ void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame( |
if (local_frame_id_.is_null()) { |
local_frame_id_ = id_allocator_->GenerateId(); |
- surface_factory_->Create(local_frame_id_); |
+ surface_factory_->SubmitCompositorFrame(local_frame_id_, |
Fady Samuel
2016/11/08 22:23:59
Is this necessary? Just add the destruction depend
Saman Sami
2016/11/11 17:49:58
Done.
|
+ cc::CompositorFrame(), |
+ cc::SurfaceFactory::DrawCallback()); |
cc::SurfaceSequence sequence = |
cc::SurfaceSequence(frame_sink_id_, next_surface_sequence_++); |
@@ -730,8 +728,6 @@ RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager( |
} |
void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() { |
- if (surface_factory_ && !local_frame_id_.is_null()) |
- surface_factory_->Destroy(local_frame_id_); |
local_frame_id_ = cc::LocalFrameId(); |
} |