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

Unified Diff: services/ui/surfaces/gpu_compositor_frame_sink.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: services/ui/surfaces/gpu_compositor_frame_sink.cc
diff --git a/services/ui/surfaces/gpu_compositor_frame_sink.cc b/services/ui/surfaces/gpu_compositor_frame_sink.cc
index b2e3a8d7cd3a78df2778116f57b554da1216b0f9..92e2ec05c6b60dc57b6fe2063c6f7f8cab3798a1 100644
--- a/services/ui/surfaces/gpu_compositor_frame_sink.cc
+++ b/services/ui/surfaces/gpu_compositor_frame_sink.cc
@@ -63,7 +63,7 @@ GpuCompositorFrameSink::~GpuCompositorFrameSink() {
// SurfaceFactory's destructor will attempt to return resources which will
// call back into here and access |client_| so we should destroy
// |surface_factory_|'s resources early on.
- surface_factory_.DestroyAll();
+ surface_factory_.EvictSurface();
display_compositor_->manager()->UnregisterSurfaceFactoryClient(
frame_sink_id_);
display_compositor_->manager()->InvalidateFrameSinkId(frame_sink_id_);
@@ -80,10 +80,7 @@ void GpuCompositorFrameSink::SubmitCompositorFrame(
// If the size of the CompostiorFrame has changed then destroy the existing
// Surface and create a new one of the appropriate size.
if (local_frame_id_ != local_frame_id) {
- if (local_frame_id_.is_valid())
- surface_factory_.Destroy(local_frame_id_);
local_frame_id_ = local_frame_id;
- surface_factory_.Create(local_frame_id_);
if (display_ && !frame.render_pass_list.empty()) {
gfx::Size frame_size = frame.render_pass_list[0]->output_rect.size();
display_->Resize(frame_size);
« no previous file with comments | « content/renderer/android/synchronous_compositor_frame_sink.cc ('k') | ui/android/delegated_frame_host_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698