OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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/image_layer.h" | 5 #include "cc/image_layer.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "cc/image_layer_updater.h" | 8 #include "cc/image_layer_updater.h" |
9 #include "cc/layer_updater.h" | 9 #include "cc/layer_updater.h" |
10 #include "cc/layer_tree_host.h" | 10 #include "cc/layer_tree_host.h" |
| 11 #include "cc/prioritized_resource.h" |
11 #include "cc/resource_update_queue.h" | 12 #include "cc/resource_update_queue.h" |
12 | 13 |
13 namespace cc { | 14 namespace cc { |
14 | 15 |
15 scoped_refptr<ImageLayer> ImageLayer::create() | 16 scoped_refptr<ImageLayer> ImageLayer::create() |
16 { | 17 { |
17 return make_scoped_refptr(new ImageLayer()); | 18 return make_scoped_refptr(new ImageLayer()); |
18 } | 19 } |
19 | 20 |
20 ImageLayer::ImageLayer() | 21 ImageLayer::ImageLayer() |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 } | 99 } |
99 | 100 |
100 float ImageLayer::imageContentsScaleY() const | 101 float ImageLayer::imageContentsScaleY() const |
101 { | 102 { |
102 if (bounds().IsEmpty() || m_bitmap.height() == 0) | 103 if (bounds().IsEmpty() || m_bitmap.height() == 0) |
103 return 1; | 104 return 1; |
104 return static_cast<float>(m_bitmap.height()) / bounds().height(); | 105 return static_cast<float>(m_bitmap.height()) / bounds().height(); |
105 } | 106 } |
106 | 107 |
107 } // namespace cc | 108 } // namespace cc |
OLD | NEW |