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

Unified Diff: services/ui/ws/gpu_compositor_frame_sink.cc

Issue 2506883002: Revert of Remove SurfaceFactory::Create and SurfaceFactory::Destroy (Closed)
Patch Set: 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/ws/gpu_compositor_frame_sink.cc
diff --git a/services/ui/ws/gpu_compositor_frame_sink.cc b/services/ui/ws/gpu_compositor_frame_sink.cc
index acf0b24cde2f427852dc276e13a83f981eba91e9..17ffc59a6842f9de6755454c221cb99fef5d6933 100644
--- a/services/ui/ws/gpu_compositor_frame_sink.cc
+++ b/services/ui/ws/gpu_compositor_frame_sink.cc
@@ -52,7 +52,7 @@
// 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_.EvictSurface();
+ surface_factory_.DestroyAll();
display_compositor_->manager()->UnregisterSurfaceFactoryClient(
frame_sink_id_);
display_compositor_->manager()->InvalidateFrameSinkId(frame_sink_id_);
@@ -68,7 +68,10 @@
// 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_.is_valid() || frame_size != last_submitted_frame_size_) {
+ if (local_frame_id_.is_valid())
+ surface_factory_.Destroy(local_frame_id_);
local_frame_id_ = surface_id_allocator_.GenerateId();
+ surface_factory_.Create(local_frame_id_);
if (display_)
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