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

Unified Diff: android_webview/browser/hardware_renderer.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 | « no previous file | android_webview/browser/surfaces_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/hardware_renderer.cc
diff --git a/android_webview/browser/hardware_renderer.cc b/android_webview/browser/hardware_renderer.cc
index ea682cb99f9774c601e69ae382a1946a3a929677..4f37ce18dbf3263d19631367edd5545af731df05 100644
--- a/android_webview/browser/hardware_renderer.cc
+++ b/android_webview/browser/hardware_renderer.cc
@@ -167,7 +167,6 @@ void HardwareRenderer::DrawGL(AwDrawGLInfo* draw_info) {
void HardwareRenderer::AllocateSurface() {
DCHECK(!child_id_.is_valid());
child_id_ = surface_id_allocator_->GenerateId();
- surface_factory_->Create(child_id_);
surfaces_->AddChildId(cc::SurfaceId(frame_sink_id_, child_id_));
}
@@ -177,9 +176,8 @@ void HardwareRenderer::DestroySurface() {
// Submit an empty frame to force any existing resources to be returned.
surface_factory_->SubmitCompositorFrame(child_id_, cc::CompositorFrame(),
cc::SurfaceFactory::DrawCallback());
-
surfaces_->RemoveChildId(cc::SurfaceId(frame_sink_id_, child_id_));
- surface_factory_->Destroy(child_id_);
+ surface_factory_->EvictSurface();
child_id_ = cc::LocalFrameId();
}
« no previous file with comments | « no previous file | android_webview/browser/surfaces_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698