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

Unified Diff: blimp/client/core/compositor/blimp_compositor.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
« no previous file with comments | « android_webview/browser/surfaces_instance.cc ('k') | cc/surfaces/direct_compositor_frame_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/core/compositor/blimp_compositor.cc
diff --git a/blimp/client/core/compositor/blimp_compositor.cc b/blimp/client/core/compositor/blimp_compositor.cc
index edafad482814c074fa7fddfe9e1c665d7a0e44df..1d01a04d24092385187bf958b6e528c1709a9702 100644
--- a/blimp/client/core/compositor/blimp_compositor.cc
+++ b/blimp/client/core/compositor/blimp_compositor.cc
@@ -192,7 +192,8 @@
host_->SetNeedsCommit();
} else if (local_frame_id_.is_valid()) {
// Make a copy request for the surface directly.
- surface_factory_->RequestCopyOfSurface(std::move(copy_request));
+ surface_factory_->RequestCopyOfSurface(local_frame_id_,
+ std::move(copy_request));
}
}
@@ -324,6 +325,7 @@
DCHECK(layer_->children().empty());
local_frame_id_ = surface_id_allocator_->GenerateId();
+ surface_factory_->Create(local_frame_id_);
current_surface_size_ = surface_size;
// manager must outlive compositors using it.
@@ -348,7 +350,8 @@
weak_ptr_factory_.GetWeakPtr()));
for (auto& copy_request : copy_requests_for_next_swap_) {
- surface_factory_->RequestCopyOfSurface(std::move(copy_request));
+ surface_factory_->RequestCopyOfSurface(local_frame_id_,
+ std::move(copy_request));
}
copy_requests_for_next_swap_.clear();
}
@@ -420,7 +423,7 @@
// Remove any references for the surface layer that uses this
// |local_frame_id_|.
layer_->RemoveAllChildren();
- surface_factory_->EvictSurface();
+ surface_factory_->Destroy(local_frame_id_);
local_frame_id_ = cc::LocalFrameId();
}
« no previous file with comments | « android_webview/browser/surfaces_instance.cc ('k') | cc/surfaces/direct_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698