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/test/tiled_layer_test_common.h" | 5 #include "cc/test/tiled_layer_test_common.h" |
6 | 6 |
7 namespace cc { | 7 namespace cc { |
8 | 8 |
9 FakeLayerUpdater::Resource::Resource(FakeLayerUpdater* layer, | 9 FakeLayerUpdater::Resource::Resource(FakeLayerUpdater* layer, |
10 scoped_ptr<PrioritizedResource> texture) | 10 scoped_ptr<PrioritizedResource> texture) |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 } | 120 } |
121 | 121 |
122 void FakeTiledLayer::UpdateContentsScale(float ideal_contents_scale) { | 122 void FakeTiledLayer::UpdateContentsScale(float ideal_contents_scale) { |
123 CalculateContentsScale(ideal_contents_scale, | 123 CalculateContentsScale(ideal_contents_scale, |
124 &draw_properties().contents_scale_x, | 124 &draw_properties().contents_scale_x, |
125 &draw_properties().contents_scale_y, | 125 &draw_properties().contents_scale_y, |
126 &draw_properties().content_bounds); | 126 &draw_properties().content_bounds); |
127 } | 127 } |
128 | 128 |
129 void FakeTiledLayer::ResetNumDependentsNeedPushProperties() { | 129 void FakeTiledLayer::ResetNumDependentsNeedPushProperties() { |
130 size_t num = 0; | 130 int num = 0; |
131 if (mask_layer()) { | 131 if (mask_layer()) { |
132 if (mask_layer()->needs_push_properties() || | 132 if (mask_layer()->needs_push_properties() || |
133 mask_layer()->descendant_needs_push_properties()) | 133 mask_layer()->descendant_needs_push_properties()) |
134 ++num; | 134 ++num; |
135 } | 135 } |
136 if (replica_layer()) { | 136 if (replica_layer()) { |
137 if (replica_layer()->needs_push_properties() || | 137 if (replica_layer()->needs_push_properties() || |
138 replica_layer()->descendant_needs_push_properties()) | 138 replica_layer()->descendant_needs_push_properties()) |
139 ++num; | 139 ++num; |
140 } | 140 } |
(...skipping 21 matching lines...) Expand all Loading... |
162 float* contents_scale_y, | 162 float* contents_scale_y, |
163 gfx::Size* content_bounds) { | 163 gfx::Size* content_bounds) { |
164 *contents_scale_x = | 164 *contents_scale_x = |
165 static_cast<float>(forced_content_bounds_.width()) / bounds().width(); | 165 static_cast<float>(forced_content_bounds_.width()) / bounds().width(); |
166 *contents_scale_y = | 166 *contents_scale_y = |
167 static_cast<float>(forced_content_bounds_.height()) / bounds().height(); | 167 static_cast<float>(forced_content_bounds_.height()) / bounds().height(); |
168 *content_bounds = forced_content_bounds_; | 168 *content_bounds = forced_content_bounds_; |
169 } | 169 } |
170 | 170 |
171 } // namespace cc | 171 } // namespace cc |
OLD | NEW |