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

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

Issue 999173004: cc: Move worker threads to content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment and webview fix Created 5 years, 9 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/BUILD.gn » ('j') | mojo/services/html_viewer/weblayertreeview_impl.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 "android_webview/browser/aw_gl_surface.h" 7 #include "android_webview/browser/aw_gl_surface.h"
8 #include "android_webview/browser/child_frame.h" 8 #include "android_webview/browser/child_frame.h"
9 #include "android_webview/browser/deferred_gpu_command_service.h" 9 #include "android_webview/browser/deferred_gpu_command_service.h"
10 #include "android_webview/browser/parent_compositor_draw_constraints.h" 10 #include "android_webview/browser/parent_compositor_draw_constraints.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 settings.renderer_settings.allow_antialiasing = false; 97 settings.renderer_settings.allow_antialiasing = false;
98 settings.renderer_settings.highp_threshold_min = 2048; 98 settings.renderer_settings.highp_threshold_min = 2048;
99 99
100 // Webview does not own the surface so should not clear it. 100 // Webview does not own the surface so should not clear it.
101 settings.renderer_settings.should_clear_root_render_pass = false; 101 settings.renderer_settings.should_clear_root_render_pass = false;
102 102
103 // TODO(enne): Update this this compositor to use a synchronous scheduler. 103 // TODO(enne): Update this this compositor to use a synchronous scheduler.
104 settings.single_thread_proxy_scheduler = false; 104 settings.single_thread_proxy_scheduler = false;
105 105
106 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded( 106 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded(
107 this, this, nullptr, nullptr, settings, nullptr, nullptr); 107 this, this, nullptr, nullptr, nullptr, settings, nullptr, nullptr);
108 layer_tree_host_->SetRootLayer(root_layer_); 108 layer_tree_host_->SetRootLayer(root_layer_);
109 layer_tree_host_->SetLayerTreeHostClientReady(); 109 layer_tree_host_->SetLayerTreeHostClientReady();
110 layer_tree_host_->set_has_transparent_background(true); 110 layer_tree_host_->set_has_transparent_background(true);
111 } 111 }
112 112
113 HardwareRenderer::~HardwareRenderer() { 113 HardwareRenderer::~HardwareRenderer() {
114 // Must reset everything before |resource_collection_| to ensure all 114 // Must reset everything before |resource_collection_| to ensure all
115 // resources are returned before resetting |resource_collection_| client. 115 // resources are returned before resetting |resource_collection_| client.
116 layer_tree_host_.reset(); 116 layer_tree_host_.reset();
117 root_layer_ = NULL; 117 root_layer_ = NULL;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 253 }
254 254
255 void HardwareRenderer::UnusedResourcesAreAvailable() { 255 void HardwareRenderer::UnusedResourcesAreAvailable() {
256 cc::ReturnedResourceArray returned_resources; 256 cc::ReturnedResourceArray returned_resources;
257 resource_collection_->TakeUnusedResourcesForChildCompositor( 257 resource_collection_->TakeUnusedResourcesForChildCompositor(
258 &returned_resources); 258 &returned_resources);
259 shared_renderer_state_->InsertReturnedResourcesOnRT(returned_resources); 259 shared_renderer_state_->InsertReturnedResourcesOnRT(returned_resources);
260 } 260 }
261 261
262 } // namespace android_webview 262 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | cc/BUILD.gn » ('j') | mojo/services/html_viewer/weblayertreeview_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698