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/layers/layer.h" | 5 #include "cc/layers/layer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 } | 389 } |
390 if (SkColorGetA(color) != 255) | 390 if (SkColorGetA(color) != 255) |
391 color = layer_tree_host_->background_color(); | 391 color = layer_tree_host_->background_color(); |
392 if (SkColorGetA(color) != 255) | 392 if (SkColorGetA(color) != 255) |
393 color = SkColorSetA(color, 255); | 393 color = SkColorSetA(color, 255); |
394 } | 394 } |
395 return color; | 395 return color; |
396 } | 396 } |
397 | 397 |
398 void Layer::CalculateContentsScale(float ideal_contents_scale, | 398 void Layer::CalculateContentsScale(float ideal_contents_scale, |
399 float device_scale_factor, | |
400 float page_scale_factor, | |
401 float maximum_animation_contents_scale, | |
402 bool animating_transform_to_screen, | |
403 float* contents_scale_x, | 399 float* contents_scale_x, |
404 float* contents_scale_y, | 400 float* contents_scale_y, |
405 gfx::Size* content_bounds) { | 401 gfx::Size* content_bounds) { |
406 DCHECK(layer_tree_host_); | 402 DCHECK(layer_tree_host_); |
407 | 403 |
408 *contents_scale_x = 1; | 404 *contents_scale_x = 1; |
409 *contents_scale_y = 1; | 405 *contents_scale_y = 1; |
410 *content_bounds = bounds(); | 406 *content_bounds = bounds(); |
411 } | 407 } |
412 | 408 |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 if (clip_parent_) | 1184 if (clip_parent_) |
1189 clip_parent_->RemoveClipChild(this); | 1185 clip_parent_->RemoveClipChild(this); |
1190 | 1186 |
1191 clip_parent_ = NULL; | 1187 clip_parent_ = NULL; |
1192 } | 1188 } |
1193 | 1189 |
1194 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) { | 1190 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) { |
1195 benchmark->RunOnLayer(this); | 1191 benchmark->RunOnLayer(this); |
1196 } | 1192 } |
1197 } // namespace cc | 1193 } // namespace cc |
OLD | NEW |