OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_image_layer_impl.h" | 5 #include "cc/layers/picture_image_layer_impl.h" |
6 | 6 |
| 7 #include <algorithm> |
| 8 |
7 #include "cc/debug/debug_colors.h" | 9 #include "cc/debug/debug_colors.h" |
8 #include "cc/trees/layer_tree_impl.h" | 10 #include "cc/trees/layer_tree_impl.h" |
9 | 11 |
10 namespace cc { | 12 namespace cc { |
11 | 13 |
12 PictureImageLayerImpl::PictureImageLayerImpl(LayerTreeImpl* tree_impl, int id) | 14 PictureImageLayerImpl::PictureImageLayerImpl(LayerTreeImpl* tree_impl, int id) |
13 : PictureLayerImpl(tree_impl, id) { | 15 : PictureLayerImpl(tree_impl, id) { |
14 } | 16 } |
15 | 17 |
16 PictureImageLayerImpl::~PictureImageLayerImpl() { | 18 PictureImageLayerImpl::~PictureImageLayerImpl() { |
(...skipping 24 matching lines...) Expand all Loading... |
41 float* raster_contents_scale, | 43 float* raster_contents_scale, |
42 float* low_res_raster_contents_scale) const { | 44 float* low_res_raster_contents_scale) const { |
43 // Don't scale images during rastering to ensure image quality, save memory | 45 // Don't scale images during rastering to ensure image quality, save memory |
44 // and avoid frequent re-rastering on change of scale. | 46 // and avoid frequent re-rastering on change of scale. |
45 *raster_contents_scale = std::max(1.f, MinimumContentsScale()); | 47 *raster_contents_scale = std::max(1.f, MinimumContentsScale()); |
46 // We don't need low res tiles. | 48 // We don't need low res tiles. |
47 *low_res_raster_contents_scale = *raster_contents_scale; | 49 *low_res_raster_contents_scale = *raster_contents_scale; |
48 } | 50 } |
49 | 51 |
50 } // namespace cc | 52 } // namespace cc |
OLD | NEW |