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

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

Issue 1821863002: Hook up ui::Compositor to Display's BeginFrameSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Display member destruction order Created 4 years, 8 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 | « android_webview/browser/hardware_renderer.h ('k') | cc/output/output_surface.h » ('j') | no next file with comments »
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // Webview does not own the surface so should not clear it. 53 // Webview does not own the surface so should not clear it.
54 settings.should_clear_root_render_pass = false; 54 settings.should_clear_root_render_pass = false;
55 55
56 surface_manager_.reset(new cc::SurfaceManager); 56 surface_manager_.reset(new cc::SurfaceManager);
57 surface_id_allocator_.reset(new cc::SurfaceIdAllocator(1)); 57 surface_id_allocator_.reset(new cc::SurfaceIdAllocator(1));
58 surface_id_allocator_->RegisterSurfaceIdNamespace(surface_manager_.get()); 58 surface_id_allocator_->RegisterSurfaceIdNamespace(surface_manager_.get());
59 surface_manager_->RegisterSurfaceFactoryClient( 59 surface_manager_->RegisterSurfaceFactoryClient(
60 surface_id_allocator_->id_namespace(), this); 60 surface_id_allocator_->id_namespace(), this);
61 display_.reset(new cc::Display(this, surface_manager_.get(), nullptr, nullptr, 61 display_.reset(new cc::Display(this, surface_manager_.get(), nullptr, nullptr,
62 settings)); 62 settings,
63 surface_id_allocator_->id_namespace()));
63 } 64 }
64 65
65 HardwareRenderer::~HardwareRenderer() { 66 HardwareRenderer::~HardwareRenderer() {
66 // Must reset everything before |surface_factory_| to ensure all 67 // Must reset everything before |surface_factory_| to ensure all
67 // resources are returned before resetting. 68 // resources are returned before resetting.
68 if (!root_id_.is_null()) 69 if (!root_id_.is_null())
69 surface_factory_->Destroy(root_id_); 70 surface_factory_->Destroy(root_id_);
70 if (!child_id_.is_null()) 71 if (!child_id_.is_null())
71 surface_factory_->Destroy(child_id_); 72 surface_factory_->Destroy(child_id_);
72 display_.reset(); 73 display_.reset();
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 const cc::ReturnedResourceArray& resources, 263 const cc::ReturnedResourceArray& resources,
263 uint32_t compositor_id, 264 uint32_t compositor_id,
264 uint32_t output_surface_id) { 265 uint32_t output_surface_id) {
265 if (output_surface_id != last_committed_output_surface_id_) 266 if (output_surface_id != last_committed_output_surface_id_)
266 return; 267 return;
267 render_thread_manager_->InsertReturnedResourcesOnRT(resources, compositor_id, 268 render_thread_manager_->InsertReturnedResourcesOnRT(resources, compositor_id,
268 output_surface_id); 269 output_surface_id);
269 } 270 }
270 271
271 } // namespace android_webview 272 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/hardware_renderer.h ('k') | cc/output/output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698