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

Side by Side Diff: chrome/browser/android/compositor/layer/tab_layer.cc

Issue 2499863002: Simplify content_layer attachment and viewporting logic. (Closed)
Patch Set: Fix clang error Created 4 years, 1 month 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
OLDNEW
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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 442
443 if (!back_visible) { 443 if (!back_visible) {
444 gfx::Rect rounded_descaled_content_area( 444 gfx::Rect rounded_descaled_content_area(
445 round(descaled_local_content_area.x()), 445 round(descaled_local_content_area.x()),
446 round(descaled_local_content_area.y()), 446 round(descaled_local_content_area.y()),
447 round(desired_content_size.width()), 447 round(desired_content_size.width()),
448 round(desired_content_size.height())); 448 round(desired_content_size.height()));
449 449
450 content_->SetProperties(id, can_use_live_layer, static_to_view_blend, 450 content_->SetProperties(id, can_use_live_layer, static_to_view_blend,
451 true, alpha, saturation, 451 true, alpha, saturation,
452 rounded_descaled_content_area, 452 true, rounded_descaled_content_area);
453 gfx::Size(content_width, content_height));
454 } else if (back_logo_resource) { 453 } else if (back_logo_resource) {
455 back_logo_->SetUIResourceId(back_logo_resource->ui_resource->id()); 454 back_logo_->SetUIResourceId(back_logo_resource->ui_resource->id());
456 } 455 }
457 456
458 //---------------------------------------------------------------------------- 457 //----------------------------------------------------------------------------
459 // Push Size, Position, Alpha and Transformations to Layers 458 // Push Size, Position, Alpha and Transformations to Layers
460 //---------------------------------------------------------------------------- 459 //----------------------------------------------------------------------------
461 shadow_->SetHideLayerAndSubtree(!shadow_visible); 460 shadow_->SetHideLayerAndSubtree(!shadow_visible);
462 if (shadow_visible) { 461 if (shadow_visible) {
463 shadow_->SetPosition(shadow_position); 462 shadow_->SetPosition(shadow_position);
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 title_->RemoveAllChildren(); 676 title_->RemoveAllChildren();
678 title_->AddChild(layer); 677 title_->AddChild(layer);
679 } 678 }
680 } 679 }
681 680
682 if (title) 681 if (title)
683 title->SetUIResourceIds(); 682 title->SetUIResourceIds();
684 } 683 }
685 684
686 } // namespace android 685 } // namespace android
OLDNEW
« no previous file with comments | « chrome/browser/android/compositor/layer/content_layer.cc ('k') | chrome/browser/android/compositor/layer/thumbnail_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698