| 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 should_use_gpu_rasterization_(tree_impl->settings().gpu_rasterization) {} | 57 should_use_gpu_rasterization_(tree_impl->settings().gpu_rasterization), |
| 58 should_use_low_res_tiling_(tree_impl->settings().low_res_tiling) {} |
| 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 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1222 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { | 1223 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { |
| 1223 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); | 1224 const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); |
| 1224 return tilings_->GPUMemoryUsageInBytes(); | 1225 return tilings_->GPUMemoryUsageInBytes(); |
| 1225 } | 1226 } |
| 1226 | 1227 |
| 1227 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { | 1228 void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) { |
| 1228 benchmark->RunOnLayer(this); | 1229 benchmark->RunOnLayer(this); |
| 1229 } | 1230 } |
| 1230 | 1231 |
| 1231 } // namespace cc | 1232 } // namespace cc |
| OLD | NEW |