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

Unified Diff: blimp/client/core/compositor/blimp_compositor.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
« 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 1d01a04d24092385187bf958b6e528c1709a9702..edafad482814c074fa7fddfe9e1c665d7a0e44df 100644
--- a/blimp/client/core/compositor/blimp_compositor.cc
+++ b/blimp/client/core/compositor/blimp_compositor.cc
@@ -192,8 +192,7 @@ void BlimpCompositor::RequestCopyOfOutput(
host_->SetNeedsCommit();
} else if (local_frame_id_.is_valid()) {
// Make a copy request for the surface directly.
- surface_factory_->RequestCopyOfSurface(local_frame_id_,
- std::move(copy_request));
+ surface_factory_->RequestCopyOfSurface(std::move(copy_request));
}
}
@@ -325,7 +324,6 @@ void BlimpCompositor::SubmitCompositorFrame(cc::CompositorFrame frame) {
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.
@@ -350,8 +348,7 @@ void BlimpCompositor::SubmitCompositorFrame(cc::CompositorFrame frame) {
weak_ptr_factory_.GetWeakPtr()));
for (auto& copy_request : copy_requests_for_next_swap_) {
- surface_factory_->RequestCopyOfSurface(local_frame_id_,
- std::move(copy_request));
+ surface_factory_->RequestCopyOfSurface(std::move(copy_request));
}
copy_requests_for_next_swap_.clear();
}
@@ -423,7 +420,7 @@ void BlimpCompositor::DestroyDelegatedContent() {
// Remove any references for the surface layer that uses this
// |local_frame_id_|.
layer_->RemoveAllChildren();
- surface_factory_->Destroy(local_frame_id_);
+ surface_factory_->EvictSurface();
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