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

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

Issue 441343002: Revert 287747 "Make SingleThreadProxy a SchedulerClient" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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/deferred_gpu_command_service.h" 8 #include "android_webview/browser/deferred_gpu_command_service.h"
9 #include "android_webview/browser/parent_output_surface.h" 9 #include "android_webview/browser/parent_output_surface.h"
10 #include "android_webview/browser/shared_renderer_state.h" 10 #include "android_webview/browser/shared_renderer_state.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 cc::LayerTreeSettings settings; 87 cc::LayerTreeSettings settings;
88 88
89 // Should be kept in sync with compositor_impl_android.cc. 89 // Should be kept in sync with compositor_impl_android.cc.
90 settings.allow_antialiasing = false; 90 settings.allow_antialiasing = false;
91 settings.highp_threshold_min = 2048; 91 settings.highp_threshold_min = 2048;
92 92
93 // Webview does not own the surface so should not clear it. 93 // Webview does not own the surface so should not clear it.
94 settings.should_clear_root_render_pass = false; 94 settings.should_clear_root_render_pass = false;
95 95
96 // TODO(enne): Update this this compositor to use a synchronous scheduler. 96 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded(
97 settings.single_thread_proxy_scheduler = false; 97 this, this, NULL, settings, NULL);
98
99 layer_tree_host_ =
100 cc::LayerTreeHost::CreateSingleThreaded(this, this, NULL, settings, NULL);
101 layer_tree_host_->SetRootLayer(root_layer_); 98 layer_tree_host_->SetRootLayer(root_layer_);
102 layer_tree_host_->SetLayerTreeHostClientReady(); 99 layer_tree_host_->SetLayerTreeHostClientReady();
103 layer_tree_host_->set_has_transparent_background(true); 100 layer_tree_host_->set_has_transparent_background(true);
104 } 101 }
105 102
106 HardwareRenderer::~HardwareRenderer() { 103 HardwareRenderer::~HardwareRenderer() {
107 // Must reset everything before |resource_collection_| to ensure all 104 // Must reset everything before |resource_collection_| to ensure all
108 // resources are returned before resetting |resource_collection_| client. 105 // resources are returned before resetting |resource_collection_| client.
109 layer_tree_host_.reset(); 106 layer_tree_host_.reset();
110 root_layer_ = NULL; 107 root_layer_ = NULL;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 } 241 }
245 242
246 void HardwareRenderer::UnusedResourcesAreAvailable() { 243 void HardwareRenderer::UnusedResourcesAreAvailable() {
247 cc::ReturnedResourceArray returned_resources; 244 cc::ReturnedResourceArray returned_resources;
248 resource_collection_->TakeUnusedResourcesForChildCompositor( 245 resource_collection_->TakeUnusedResourcesForChildCompositor(
249 &returned_resources); 246 &returned_resources);
250 shared_renderer_state_->InsertReturnedResources(returned_resources); 247 shared_renderer_state_->InsertReturnedResources(returned_resources);
251 } 248 }
252 249
253 } // namespace android_webview 250 } // namespace android_webview
OLDNEW
« no previous file with comments | « trunk/src/android_webview/browser/hardware_renderer.h ('k') | trunk/src/cc/scheduler/scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698