OLD | NEW |
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 Loading... |
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 has_gpu_rasterization_hint_(false) {} | 57 should_use_low_res_tiling_(tree_impl->settings().low_res_tiling) {} |
58 | 58 |
59 PictureLayerImpl::~PictureLayerImpl() {} | 59 PictureLayerImpl::~PictureLayerImpl() {} |
60 | 60 |
61 const char* PictureLayerImpl::LayerTypeAsString() const { | 61 const char* PictureLayerImpl::LayerTypeAsString() const { |
62 return "cc::PictureLayerImpl"; | 62 return "cc::PictureLayerImpl"; |
63 } | 63 } |
64 | 64 |
65 scoped_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl( | 65 scoped_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl( |
66 LayerTreeImpl* tree_impl) { | 66 LayerTreeImpl* tree_impl) { |
67 return PictureLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>(); | 67 return PictureLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>(); |
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1250 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { | 1250 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { |
1251 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); | 1251 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); |
1252 return tilings_->GPUMemoryUsageInBytes(); | 1252 return tilings_->GPUMemoryUsageInBytes(); |
1253 } | 1253 } |
1254 | 1254 |
1255 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { | 1255 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { |
1256 benchmark->RunOnLayer(this); | 1256 benchmark->RunOnLayer(this); |
1257 } | 1257 } |
1258 | 1258 |
1259 } // namespace cc | 1259 } // namespace cc |
OLD | NEW |