Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: cc/test/tiled_layer_test_common.cc

Issue 1168903003: cc: Fix size_t to int truncations in tiles/ and trees/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/resources/memory_history.cc ('k') | cc/tiles/picture_layer_tiling.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/resources/memory_history.cc ('k') | cc/tiles/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698