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

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

Issue 400773002: cc: Parameterize the main thread task runner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove mistakenly added decl. Created 6 years, 5 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
« no previous file with comments | « no previous file | cc/layers/layer_perftest.cc » ('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 "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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 cc::LayerTreeSettings settings; 85 cc::LayerTreeSettings settings;
86 86
87 // Should be kept in sync with compositor_impl_android.cc. 87 // Should be kept in sync with compositor_impl_android.cc.
88 settings.allow_antialiasing = false; 88 settings.allow_antialiasing = false;
89 settings.highp_threshold_min = 2048; 89 settings.highp_threshold_min = 2048;
90 90
91 // Webview does not own the surface so should not clear it. 91 // Webview does not own the surface so should not clear it.
92 settings.should_clear_root_render_pass = false; 92 settings.should_clear_root_render_pass = false;
93 93
94 layer_tree_host_ = 94 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded(
95 cc::LayerTreeHost::CreateSingleThreaded(this, this, NULL, settings); 95 this, this, NULL, settings, base::MessageLoopProxy::current());
boliu 2014/07/17 18:58:29 I think this can just be null
Sami 2014/07/18 10:54:11 Done.
96 layer_tree_host_->SetRootLayer(root_layer_); 96 layer_tree_host_->SetRootLayer(root_layer_);
97 layer_tree_host_->SetLayerTreeHostClientReady(); 97 layer_tree_host_->SetLayerTreeHostClientReady();
98 layer_tree_host_->set_has_transparent_background(true); 98 layer_tree_host_->set_has_transparent_background(true);
99 } 99 }
100 100
101 HardwareRenderer::~HardwareRenderer() { 101 HardwareRenderer::~HardwareRenderer() {
102 // Must reset everything before |resource_collection_| to ensure all 102 // Must reset everything before |resource_collection_| to ensure all
103 // resources are returned before resetting |resource_collection_| client. 103 // resources are returned before resetting |resource_collection_| client.
104 layer_tree_host_.reset(); 104 layer_tree_host_.reset();
105 root_layer_ = NULL; 105 root_layer_ = NULL;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 224 }
225 225
226 void HardwareRenderer::UnusedResourcesAreAvailable() { 226 void HardwareRenderer::UnusedResourcesAreAvailable() {
227 cc::ReturnedResourceArray returned_resources; 227 cc::ReturnedResourceArray returned_resources;
228 resource_collection_->TakeUnusedResourcesForChildCompositor( 228 resource_collection_->TakeUnusedResourcesForChildCompositor(
229 &returned_resources); 229 &returned_resources);
230 shared_renderer_state_->InsertReturnedResources(returned_resources); 230 shared_renderer_state_->InsertReturnedResources(returned_resources);
231 } 231 }
232 232
233 } // namespace android_webview 233 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698