| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/android/compositor/layer/tab_layer.h" | 5 #include "chrome/browser/android/compositor/layer/tab_layer.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
| 10 #include "cc/layers/layer_collections.h" | 10 #include "cc/layers/layer_collections.h" |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 | 446 |
| 447 if (!back_visible) { | 447 if (!back_visible) { |
| 448 gfx::Rect rounded_descaled_content_area( | 448 gfx::Rect rounded_descaled_content_area( |
| 449 round(descaled_local_content_area.x()), | 449 round(descaled_local_content_area.x()), |
| 450 round(descaled_local_content_area.y()), | 450 round(descaled_local_content_area.y()), |
| 451 round(desired_content_size.width()), | 451 round(desired_content_size.width()), |
| 452 round(desired_content_size.height())); | 452 round(desired_content_size.height())); |
| 453 | 453 |
| 454 content_->SetProperties(id, can_use_live_layer, static_to_view_blend, | 454 content_->SetProperties(id, can_use_live_layer, static_to_view_blend, |
| 455 true, alpha, saturation, | 455 true, alpha, saturation, |
| 456 rounded_descaled_content_area, | 456 true, rounded_descaled_content_area); |
| 457 gfx::Size(content_width, content_height)); | |
| 458 } else if (back_logo_resource) { | 457 } else if (back_logo_resource) { |
| 459 back_logo_->SetUIResourceId(back_logo_resource->ui_resource->id()); | 458 back_logo_->SetUIResourceId(back_logo_resource->ui_resource->id()); |
| 460 } | 459 } |
| 461 | 460 |
| 462 //---------------------------------------------------------------------------- | 461 //---------------------------------------------------------------------------- |
| 463 // Push Size, Position, Alpha and Transformations to Layers | 462 // Push Size, Position, Alpha and Transformations to Layers |
| 464 //---------------------------------------------------------------------------- | 463 //---------------------------------------------------------------------------- |
| 465 shadow_->SetHideLayerAndSubtree(!shadow_visible); | 464 shadow_->SetHideLayerAndSubtree(!shadow_visible); |
| 466 if (shadow_visible) { | 465 if (shadow_visible) { |
| 467 shadow_->SetPosition(shadow_position); | 466 shadow_->SetPosition(shadow_position); |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 title_->RemoveAllChildren(); | 680 title_->RemoveAllChildren(); |
| 682 title_->AddChild(layer); | 681 title_->AddChild(layer); |
| 683 } | 682 } |
| 684 } | 683 } |
| 685 | 684 |
| 686 if (title) | 685 if (title) |
| 687 title->SetUIResourceIds(); | 686 title->SetUIResourceIds(); |
| 688 } | 687 } |
| 689 | 688 |
| 690 } // namespace android | 689 } // namespace android |
| OLD | NEW |