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

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

Issue 12665005: cc: Use highp precision for texture coords if available and needed (Closed) Base URL: http://git.chromium.org/chromium/src.git@highp2
Patch Set: rebase after all dependencies landed Created 7 years, 8 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/test/pixel_test.cc ('k') | cc/trees/layer_tree_host_impl_unittest.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 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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 1275
1276 // Note: order is important here. 1276 // Note: order is important here.
1277 renderer_.reset(); 1277 renderer_.reset();
1278 tile_manager_.reset(); 1278 tile_manager_.reset();
1279 resource_provider_.reset(); 1279 resource_provider_.reset();
1280 output_surface_.reset(); 1280 output_surface_.reset();
1281 1281
1282 if (!output_surface->BindToClient(this)) 1282 if (!output_surface->BindToClient(this))
1283 return false; 1283 return false;
1284 1284
1285 scoped_ptr<ResourceProvider> resource_provider = 1285 scoped_ptr<ResourceProvider> resource_provider = ResourceProvider::Create(
1286 ResourceProvider::Create(output_surface.get()); 1286 output_surface.get(), settings_.highp_threshold_min);
1287 if (!resource_provider) 1287 if (!resource_provider)
1288 return false; 1288 return false;
1289 1289
1290 if (settings_.impl_side_painting) { 1290 if (settings_.impl_side_painting) {
1291 tile_manager_.reset(new TileManager(this, 1291 tile_manager_.reset(new TileManager(this,
1292 resource_provider.get(), 1292 resource_provider.get(),
1293 settings_.num_raster_threads, 1293 settings_.num_raster_threads,
1294 settings_.max_prepaint_tile_distance, 1294 settings_.max_prepaint_tile_distance,
1295 settings_.use_cheapness_estimator, 1295 settings_.use_cheapness_estimator,
1296 settings_.use_color_estimator, 1296 settings_.use_color_estimator,
1297 settings_.prediction_benchmarking, 1297 settings_.prediction_benchmarking,
1298 rendering_stats_instrumentation_)); 1298 rendering_stats_instrumentation_));
1299 } 1299 }
1300 1300
1301 if (output_surface->capabilities().has_parent_compositor) { 1301 if (output_surface->capabilities().has_parent_compositor) {
1302 renderer_ = DelegatingRenderer::Create(this, output_surface.get(), 1302 renderer_ = DelegatingRenderer::Create(this, output_surface.get(),
1303 resource_provider.get()); 1303 resource_provider.get());
1304 } else if (output_surface->context3d()) { 1304 } else if (output_surface->context3d()) {
1305 renderer_ = GLRenderer::Create(this, 1305 renderer_ = GLRenderer::Create(this,
1306 output_surface.get(), 1306 output_surface.get(),
1307 resource_provider.get()); 1307 resource_provider.get(),
1308 settings_.highp_threshold_min);
1308 } else if (output_surface->software_device()) { 1309 } else if (output_surface->software_device()) {
1309 renderer_ = SoftwareRenderer::Create(this, 1310 renderer_ = SoftwareRenderer::Create(this,
1310 output_surface.get(), 1311 output_surface.get(),
1311 resource_provider.get()); 1312 resource_provider.get());
1312 } 1313 }
1313 if (!renderer_) 1314 if (!renderer_)
1314 return false; 1315 return false;
1315 1316
1316 resource_provider_ = resource_provider.Pass(); 1317 resource_provider_ = resource_provider.Pass();
1317 output_surface_ = output_surface.Pass(); 1318 output_surface_ = output_surface.Pass();
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
2060 } 2061 }
2061 2062
2062 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { 2063 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) {
2063 if (debug_state_.continuous_painting != debug_state.continuous_painting) 2064 if (debug_state_.continuous_painting != debug_state.continuous_painting)
2064 paint_time_counter_->ClearHistory(); 2065 paint_time_counter_->ClearHistory();
2065 2066
2066 debug_state_ = debug_state; 2067 debug_state_ = debug_state;
2067 } 2068 }
2068 2069
2069 } // namespace cc 2070 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/pixel_test.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698