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

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

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: rebase Created 6 years, 2 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 | base/threading/thread_restrictions.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 "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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Should be kept in sync with compositor_impl_android.cc. 91 // Should be kept in sync with compositor_impl_android.cc.
92 settings.allow_antialiasing = false; 92 settings.allow_antialiasing = false;
93 settings.highp_threshold_min = 2048; 93 settings.highp_threshold_min = 2048;
94 94
95 // Webview does not own the surface so should not clear it. 95 // Webview does not own the surface so should not clear it.
96 settings.should_clear_root_render_pass = false; 96 settings.should_clear_root_render_pass = false;
97 97
98 // TODO(enne): Update this this compositor to use a synchronous scheduler. 98 // TODO(enne): Update this this compositor to use a synchronous scheduler.
99 settings.single_thread_proxy_scheduler = false; 99 settings.single_thread_proxy_scheduler = false;
100 100
101 layer_tree_host_ = 101 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded(
102 cc::LayerTreeHost::CreateSingleThreaded(this, this, NULL, settings, NULL); 102 this, this, NULL, NULL, settings, NULL);
103 layer_tree_host_->SetRootLayer(root_layer_); 103 layer_tree_host_->SetRootLayer(root_layer_);
104 layer_tree_host_->SetLayerTreeHostClientReady(); 104 layer_tree_host_->SetLayerTreeHostClientReady();
105 layer_tree_host_->set_has_transparent_background(true); 105 layer_tree_host_->set_has_transparent_background(true);
106 } 106 }
107 107
108 HardwareRenderer::~HardwareRenderer() { 108 HardwareRenderer::~HardwareRenderer() {
109 SetFrameData(); 109 SetFrameData();
110 110
111 // Must reset everything before |resource_collection_| to ensure all 111 // Must reset everything before |resource_collection_| to ensure all
112 // resources are returned before resetting |resource_collection_| client. 112 // resources are returned before resetting |resource_collection_| client.
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 void HardwareRenderer::UnusedResourcesAreAvailable() { 259 void HardwareRenderer::UnusedResourcesAreAvailable() {
260 cc::ReturnedResourceArray returned_resources; 260 cc::ReturnedResourceArray returned_resources;
261 resource_collection_->TakeUnusedResourcesForChildCompositor( 261 resource_collection_->TakeUnusedResourcesForChildCompositor(
262 &returned_resources); 262 &returned_resources);
263 shared_renderer_state_->InsertReturnedResources(returned_resources); 263 shared_renderer_state_->InsertReturnedResources(returned_resources);
264 } 264 }
265 265
266 } // namespace android_webview 266 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | base/threading/thread_restrictions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698