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

Side by Side Diff: android_webview/browser/hardware_renderer.cc

Issue 2029323004: Get rid of virtual Display::CreateScheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onscreendisplayclient
Patch Set: displaytest: androids 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/surfaces/display.h » ('j') | cc/surfaces/display.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/browser/hardware_renderer.h" 5 #include "android_webview/browser/hardware_renderer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "android_webview/browser/aw_gl_surface.h" 9 #include "android_webview/browser/aw_gl_surface.h"
10 #include "android_webview/browser/aw_render_thread_context_provider.h" 10 #include "android_webview/browser/aw_render_thread_context_provider.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 surface_id_allocator_->id_namespace(), this); 60 surface_id_allocator_->id_namespace(), this);
61 61
62 std::unique_ptr<ParentOutputSurface> output_surface_holder( 62 std::unique_ptr<ParentOutputSurface> output_surface_holder(
63 new ParentOutputSurface(AwRenderThreadContextProvider::Create( 63 new ParentOutputSurface(AwRenderThreadContextProvider::Create(
64 gl_surface_, DeferredGpuCommandService::GetInstance()))); 64 gl_surface_, DeferredGpuCommandService::GetInstance())));
65 output_surface_ = output_surface_holder.get(); 65 output_surface_ = output_surface_holder.get();
66 display_.reset(new cc::Display( 66 display_.reset(new cc::Display(
67 surface_manager_.get(), nullptr /* shared_bitmap_manager */, 67 surface_manager_.get(), nullptr /* shared_bitmap_manager */,
68 nullptr /* gpu_memory_buffer_manager */, settings, 68 nullptr /* gpu_memory_buffer_manager */, settings,
69 surface_id_allocator_->id_namespace(), nullptr /* task_runner */, 69 surface_id_allocator_->id_namespace(), nullptr /* task_runner */,
70 std::move(output_surface_holder))); 70 nullptr /* begin_frame_source */, std::move(output_surface_holder)));
71 display_->Initialize(this); 71 display_->Initialize(this);
72 } 72 }
73 73
74 HardwareRenderer::~HardwareRenderer() { 74 HardwareRenderer::~HardwareRenderer() {
75 // Must reset everything before |surface_factory_| to ensure all 75 // Must reset everything before |surface_factory_| to ensure all
76 // resources are returned before resetting. 76 // resources are returned before resetting.
77 if (!root_id_.is_null()) 77 if (!root_id_.is_null())
78 surface_factory_->Destroy(root_id_); 78 surface_factory_->Destroy(root_id_);
79 if (!child_id_.is_null()) 79 if (!child_id_.is_null())
80 surface_factory_->Destroy(child_id_); 80 surface_factory_->Destroy(child_id_);
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 const cc::ReturnedResourceArray& resources, 262 const cc::ReturnedResourceArray& resources,
263 uint32_t compositor_id, 263 uint32_t compositor_id,
264 uint32_t output_surface_id) { 264 uint32_t output_surface_id) {
265 if (output_surface_id != last_committed_output_surface_id_) 265 if (output_surface_id != last_committed_output_surface_id_)
266 return; 266 return;
267 render_thread_manager_->InsertReturnedResourcesOnRT(resources, compositor_id, 267 render_thread_manager_->InsertReturnedResourcesOnRT(resources, compositor_id,
268 output_surface_id); 268 output_surface_id);
269 } 269 }
270 270
271 } // namespace android_webview 271 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/display.h » ('j') | cc/surfaces/display.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698