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

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 189883009: Define a --force-gpu-rasterization flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor logic fix-up Created 6 years, 9 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 ideal_contents_scale_(0.f), 47 ideal_contents_scale_(0.f),
48 raster_page_scale_(0.f), 48 raster_page_scale_(0.f),
49 raster_device_scale_(0.f), 49 raster_device_scale_(0.f),
50 raster_source_scale_(0.f), 50 raster_source_scale_(0.f),
51 raster_contents_scale_(0.f), 51 raster_contents_scale_(0.f),
52 low_res_raster_contents_scale_(0.f), 52 low_res_raster_contents_scale_(0.f),
53 raster_source_scale_was_animating_(false), 53 raster_source_scale_was_animating_(false),
54 is_using_lcd_text_(tree_impl->settings().can_use_lcd_text), 54 is_using_lcd_text_(tree_impl->settings().can_use_lcd_text),
55 needs_post_commit_initialization_(true), 55 needs_post_commit_initialization_(true),
56 should_update_tile_priorities_(false), 56 should_update_tile_priorities_(false),
57 should_use_gpu_rasterization_(tree_impl->settings().gpu_rasterization) {} 57 should_use_gpu_rasterization_(
58 tree_impl->settings().gpu_rasterization_state ==
59 LayerTreeSettings::GpuRasterizationForced) {}
58 60
59 PictureLayerImpl::~PictureLayerImpl() {} 61 PictureLayerImpl::~PictureLayerImpl() {}
60 62
61 const char* PictureLayerImpl::LayerTypeAsString() const { 63 const char* PictureLayerImpl::LayerTypeAsString() const {
62 return "cc::PictureLayerImpl"; 64 return "cc::PictureLayerImpl";
63 } 65 }
64 66
65 scoped_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl( 67 scoped_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl(
66 LayerTreeImpl* tree_impl) { 68 LayerTreeImpl* tree_impl) {
67 return PictureLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>(); 69 return PictureLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { 1240 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const {
1239 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); 1241 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded();
1240 return tilings_->GPUMemoryUsageInBytes(); 1242 return tilings_->GPUMemoryUsageInBytes();
1241 } 1243 }
1242 1244
1243 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { 1245 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
1244 benchmark->RunOnLayer(this); 1246 benchmark->RunOnLayer(this);
1245 } 1247 }
1246 1248
1247 } // namespace cc 1249 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698