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

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

Issue 881513004: Add a command-line flag to set GPU rasterization multisampling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cache msaa sample count to avoid double-parsing it. Created 5 years, 10 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/layer_tree_pixel_resource_test.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 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 tile_task_worker_pool_->AsTileTaskRunner(), 1949 tile_task_worker_pool_->AsTileTaskRunner(),
1950 rasterizer_.get(), scheduled_raster_task_limit); 1950 rasterizer_.get(), scheduled_raster_task_limit);
1951 1951
1952 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy()); 1952 UpdateTileManagerMemoryPolicy(ActualManagedMemoryPolicy());
1953 } 1953 }
1954 1954
1955 scoped_ptr<Rasterizer> LayerTreeHostImpl::CreateRasterizer() { 1955 scoped_ptr<Rasterizer> LayerTreeHostImpl::CreateRasterizer() {
1956 ContextProvider* context_provider = output_surface_->context_provider(); 1956 ContextProvider* context_provider = output_surface_->context_provider();
1957 if (use_gpu_rasterization_ && context_provider) { 1957 if (use_gpu_rasterization_ && context_provider) {
1958 return GpuRasterizer::Create(context_provider, resource_provider_.get(), 1958 return GpuRasterizer::Create(context_provider, resource_provider_.get(),
1959 settings_.use_distance_field_text, false); 1959 settings_.use_distance_field_text, false,
1960 settings_.gpu_rasterization_msaa_sample_count);
1960 } 1961 }
1961 return SoftwareRasterizer::Create(); 1962 return SoftwareRasterizer::Create();
1962 } 1963 }
1963 1964
1964 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool( 1965 void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool(
1965 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, 1966 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool,
1966 scoped_ptr<ResourcePool>* resource_pool, 1967 scoped_ptr<ResourcePool>* resource_pool,
1967 scoped_ptr<ResourcePool>* staging_resource_pool) { 1968 scoped_ptr<ResourcePool>* staging_resource_pool) {
1968 base::SingleThreadTaskRunner* task_runner = 1969 base::SingleThreadTaskRunner* task_runner =
1969 proxy_->HasImplThread() ? proxy_->ImplThreadTaskRunner() 1970 proxy_->HasImplThread() ? proxy_->ImplThreadTaskRunner()
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after
3453 } 3454 }
3454 3455
3455 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3456 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3456 std::vector<PictureLayerImpl*>::iterator it = 3457 std::vector<PictureLayerImpl*>::iterator it =
3457 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3458 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3458 DCHECK(it != picture_layers_.end()); 3459 DCHECK(it != picture_layers_.end());
3459 picture_layers_.erase(it); 3460 picture_layers_.erase(it);
3460 } 3461 }
3461 3462
3462 } // namespace cc 3463 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_pixel_resource_test.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698