| 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/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 break; | 415 break; |
| 416 } | 416 } |
| 417 if (SkColorGetA(color) != 255) | 417 if (SkColorGetA(color) != 255) |
| 418 color = layer_tree_host_->background_color(); | 418 color = layer_tree_host_->background_color(); |
| 419 if (SkColorGetA(color) != 255) | 419 if (SkColorGetA(color) != 255) |
| 420 color = SkColorSetA(color, 255); | 420 color = SkColorSetA(color, 255); |
| 421 } | 421 } |
| 422 return color; | 422 return color; |
| 423 } | 423 } |
| 424 | 424 |
| 425 void Layer::CalculateContentsScale( | 425 void Layer::CalculateContentsScale(float ideal_contents_scale, |
| 426 float ideal_contents_scale, | 426 float device_scale_factor, |
| 427 float device_scale_factor, | 427 float page_scale_factor, |
| 428 float page_scale_factor, | 428 float maximum_animation_contents_scale, |
| 429 bool animating_transform_to_screen, | 429 bool animating_transform_to_screen, |
| 430 float* contents_scale_x, | 430 float* contents_scale_x, |
| 431 float* contents_scale_y, | 431 float* contents_scale_y, |
| 432 gfx::Size* content_bounds) { | 432 gfx::Size* content_bounds) { |
| 433 DCHECK(layer_tree_host_); | 433 DCHECK(layer_tree_host_); |
| 434 | 434 |
| 435 *contents_scale_x = 1; | 435 *contents_scale_x = 1; |
| 436 *contents_scale_y = 1; | 436 *contents_scale_y = 1; |
| 437 *content_bounds = bounds(); | 437 *content_bounds = bounds(); |
| 438 } | 438 } |
| 439 | 439 |
| 440 void Layer::SetMasksToBounds(bool masks_to_bounds) { | 440 void Layer::SetMasksToBounds(bool masks_to_bounds) { |
| 441 DCHECK(IsPropertyChangeAllowed()); | 441 DCHECK(IsPropertyChangeAllowed()); |
| 442 if (masks_to_bounds_ == masks_to_bounds) | 442 if (masks_to_bounds_ == masks_to_bounds) |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1190 if (clip_parent_) | 1190 if (clip_parent_) |
| 1191 clip_parent_->RemoveClipChild(this); | 1191 clip_parent_->RemoveClipChild(this); |
| 1192 | 1192 |
| 1193 clip_parent_ = NULL; | 1193 clip_parent_ = NULL; |
| 1194 } | 1194 } |
| 1195 | 1195 |
| 1196 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) { | 1196 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) { |
| 1197 benchmark->RunOnLayer(this); | 1197 benchmark->RunOnLayer(this); |
| 1198 } | 1198 } |
| 1199 } // namespace cc | 1199 } // namespace cc |
| OLD | NEW |