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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 14409006: cc: Changes to use GL API for GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glapi
Patch Set: Alphabetize switch names in lists Created 7 years, 7 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 | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_settings.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 // TODO(joth): Defer creating the Renderer too, until GL is initialized. 1427 // TODO(joth): Defer creating the Renderer too, until GL is initialized.
1428 // See http://crbug.com/230197 1428 // See http://crbug.com/230197
1429 renderer_ = SoftwareRenderer::Create(this, output_surface.get(), NULL); 1429 renderer_ = SoftwareRenderer::Create(this, output_surface.get(), NULL);
1430 } else { 1430 } else {
1431 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create( 1431 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create(
1432 output_surface.get(), settings_.highp_threshold_min); 1432 output_surface.get(), settings_.highp_threshold_min);
1433 if (!resource_provider) 1433 if (!resource_provider)
1434 return false; 1434 return false;
1435 1435
1436 if (settings_.impl_side_painting) { 1436 if (settings_.impl_side_painting) {
1437 bool using_map_image = false;
1438 if (renderer() != NULL) {
1439 // Renderer may be NULL in unit tests.
reveman 2013/05/22 23:51:49 is the problem not just that you're creating the r
kaanb 2013/05/22 23:59:27 Yes, I moved TileManager creation after the Render
1440 using_map_image = GetRendererCapabilities().using_map_image;
1441 }
1437 tile_manager_ = TileManager::Create(this, 1442 tile_manager_ = TileManager::Create(this,
1438 resource_provider.get(), 1443 resource_provider.get(),
1439 settings_.num_raster_threads, 1444 settings_.num_raster_threads,
1440 settings_.use_color_estimator, 1445 settings_.use_color_estimator,
1441 rendering_stats_instrumentation_); 1446 rendering_stats_instrumentation_,
1447 using_map_image);
1442 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); 1448 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy());
1443 } 1449 }
1444 1450
1445 if (output_surface->capabilities().has_parent_compositor) { 1451 if (output_surface->capabilities().has_parent_compositor) {
1446 renderer_ = DelegatingRenderer::Create(this, output_surface.get(), 1452 renderer_ = DelegatingRenderer::Create(this, output_surface.get(),
1447 resource_provider.get()); 1453 resource_provider.get());
1448 } else if (output_surface->context3d()) { 1454 } else if (output_surface->context3d()) {
1449 renderer_ = GLRenderer::Create(this, 1455 renderer_ = GLRenderer::Create(this,
1450 output_surface.get(), 1456 output_surface.get(),
1451 resource_provider.get(), 1457 resource_provider.get(),
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
2234 } 2240 }
2235 2241
2236 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { 2242 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) {
2237 if (debug_state_.continuous_painting != debug_state.continuous_painting) 2243 if (debug_state_.continuous_painting != debug_state.continuous_painting)
2238 paint_time_counter_->ClearHistory(); 2244 paint_time_counter_->ClearHistory();
2239 2245
2240 debug_state_ = debug_state; 2246 debug_state_ = debug_state;
2241 } 2247 }
2242 2248
2243 } // namespace cc 2249 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698