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

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: Rebased 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_(tree_impl->settings().rasterization_site ==
58 LayerTreeSettings::GpuRasterization) {}
58 59
59 PictureLayerImpl::~PictureLayerImpl() {} 60 PictureLayerImpl::~PictureLayerImpl() {}
60 61
61 const char* PictureLayerImpl::LayerTypeAsString() const { 62 const char* PictureLayerImpl::LayerTypeAsString() const {
62 return "cc::PictureLayerImpl"; 63 return "cc::PictureLayerImpl";
63 } 64 }
64 65
65 scoped_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl( 66 scoped_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl(
66 LayerTreeImpl* tree_impl) { 67 LayerTreeImpl* tree_impl) {
67 return PictureLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>(); 68 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 { 1239 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const {
1239 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); 1240 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded();
1240 return tilings_->GPUMemoryUsageInBytes(); 1241 return tilings_->GPUMemoryUsageInBytes();
1241 } 1242 }
1242 1243
1243 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { 1244 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
1244 benchmark->RunOnLayer(this); 1245 benchmark->RunOnLayer(this);
1245 } 1246 }
1246 1247
1247 } // namespace cc 1248 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698