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

Unified Diff: android_webview/browser/hardware_renderer.cc

Issue 2036563002: Delete OnscreenDisplayClient and TopLevelDisplayClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: onscreendisplayclient: webview-scoped-allow-gl-for-hardwarerenderer-constructor Created 4 years, 6 months 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.h ('k') | android_webview/browser/render_thread_manager.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 aee41918b23ba47b2a631e7bd718871de9cf28a0..a739c83f0aeae6fbf5f74dbab5175f09868c228a 100644
--- a/android_webview/browser/hardware_renderer.cc
+++ b/android_webview/browser/hardware_renderer.cc
@@ -58,9 +58,17 @@ HardwareRenderer::HardwareRenderer(RenderThreadManager* state)
surface_id_allocator_->RegisterSurfaceIdNamespace(surface_manager_.get());
surface_manager_->RegisterSurfaceFactoryClient(
surface_id_allocator_->id_namespace(), this);
- display_.reset(new cc::Display(this, surface_manager_.get(), nullptr, nullptr,
- settings,
- surface_id_allocator_->id_namespace()));
+
+ std::unique_ptr<ParentOutputSurface> output_surface_holder(
+ new ParentOutputSurface(AwRenderThreadContextProvider::Create(
+ gl_surface_, DeferredGpuCommandService::GetInstance())));
+ output_surface_ = output_surface_holder.get();
+ display_.reset(new cc::Display(
+ surface_manager_.get(), nullptr /* shared_bitmap_manager */,
+ nullptr /* gpu_memory_buffer_manager */, settings,
+ surface_id_allocator_->id_namespace(), nullptr /* task_runner */,
+ std::move(output_surface_holder)));
+ display_->Initialize(this);
}
HardwareRenderer::~HardwareRenderer() {
@@ -213,15 +221,6 @@ void HardwareRenderer::DrawGL(AwDrawGLInfo* draw_info,
display_->Resize(viewport);
- if (!output_surface_) {
- scoped_refptr<cc::ContextProvider> context_provider =
- AwRenderThreadContextProvider::Create(
- gl_surface_, DeferredGpuCommandService::GetInstance());
- std::unique_ptr<ParentOutputSurface> output_surface_holder(
- new ParentOutputSurface(context_provider));
- output_surface_ = output_surface_holder.get();
- display_->Initialize(std::move(output_surface_holder), nullptr);
- }
output_surface_->SetGLState(gl_state);
display_->SetExternalClip(clip);
display_->DrawAndSwap();
« no previous file with comments | « android_webview/browser/hardware_renderer.h ('k') | android_webview/browser/render_thread_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698