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

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

Issue 2485473003: Remove SurfaceFactory::Create and SurfaceFactory::Destroy (Closed)
Patch Set: up Created 4 years, 1 month 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 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();
}

Powered by Google App Engine
This is Rietveld 408576698