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

Unified Diff: android_webview/browser/surfaces_instance.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/hardware_renderer.cc ('k') | blimp/client/core/compositor/blimp_compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/surfaces_instance.cc
diff --git a/android_webview/browser/surfaces_instance.cc b/android_webview/browser/surfaces_instance.cc
index 2803531ca5e4871dfef9bd99701f761888896aa7..099858e942b4c7f8f41c537b7f51218b12d300dd 100644
--- a/android_webview/browser/surfaces_instance.cc
+++ b/android_webview/browser/surfaces_instance.cc
@@ -85,8 +85,7 @@ SurfacesInstance::~SurfacesInstance() {
g_surfaces_instance = nullptr;
DCHECK(child_ids_.empty());
- if (root_id_.is_valid())
- surface_factory_->Destroy(root_id_);
+ surface_factory_->EvictSurface();
surface_manager_->InvalidateFrameSinkId(frame_sink_id_);
}
@@ -138,7 +137,6 @@ void SurfacesInstance::DrawAndSwap(const gfx::Size& viewport,
if (!root_id_.is_valid()) {
root_id_ = surface_id_allocator_->GenerateId();
- surface_factory_->Create(root_id_);
display_->SetLocalFrameId(root_id_, 1.f);
}
surface_factory_->SubmitCompositorFrame(root_id_, std::move(frame),
« no previous file with comments | « android_webview/browser/hardware_renderer.cc ('k') | blimp/client/core/compositor/blimp_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698