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

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

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 years, 9 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
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 "cc/layers/layer.h" 8 #include "cc/layers/layer.h"
9 #include "cc/layers/layer_lists.h" 9 #include "cc/layers/layer_lists.h"
10 #include "cc/layers/layer_settings.h"
11 #include "cc/layers/nine_patch_layer.h" 10 #include "cc/layers/nine_patch_layer.h"
12 #include "cc/layers/solid_color_layer.h" 11 #include "cc/layers/solid_color_layer.h"
13 #include "cc/layers/ui_resource_layer.h" 12 #include "cc/layers/ui_resource_layer.h"
14 #include "cc/resources/scoped_ui_resource.h" 13 #include "cc/resources/scoped_ui_resource.h"
15 #include "chrome/browser/android/compositor/decoration_title.h" 14 #include "chrome/browser/android/compositor/decoration_title.h"
16 #include "chrome/browser/android/compositor/layer/content_layer.h" 15 #include "chrome/browser/android/compositor/layer/content_layer.h"
17 #include "chrome/browser/android/compositor/layer/toolbar_layer.h" 16 #include "chrome/browser/android/compositor/layer/toolbar_layer.h"
18 #include "chrome/browser/android/compositor/layer_title_cache.h" 17 #include "chrome/browser/android/compositor/layer_title_cache.h"
19 #include "chrome/browser/android/compositor/tab_content_manager.h" 18 #include "chrome/browser/android/compositor/tab_content_manager.h"
20 #include "content/public/browser/android/compositor.h" 19 #include "content/public/browser/android/compositor.h"
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 return layer_; 578 return layer_;
580 } 579 }
581 580
582 TabLayer::TabLayer(bool incognito, 581 TabLayer::TabLayer(bool incognito,
583 ui::ResourceManager* resource_manager, 582 ui::ResourceManager* resource_manager,
584 LayerTitleCache* layer_title_cache, 583 LayerTitleCache* layer_title_cache,
585 TabContentManager* tab_content_manager) 584 TabContentManager* tab_content_manager)
586 : incognito_(incognito), 585 : incognito_(incognito),
587 resource_manager_(resource_manager), 586 resource_manager_(resource_manager),
588 layer_title_cache_(layer_title_cache), 587 layer_title_cache_(layer_title_cache),
589 layer_(cc::Layer::Create(cc::LayerSettings())), 588 layer_(cc::Layer::Create()),
590 toolbar_layer_(ToolbarLayer::Create(resource_manager)), 589 toolbar_layer_(ToolbarLayer::Create(resource_manager)),
591 title_(cc::Layer::Create(cc::LayerSettings())), 590 title_(cc::Layer::Create()),
592 content_(ContentLayer::Create(tab_content_manager)), 591 content_(ContentLayer::Create(tab_content_manager)),
593 padding_( 592 padding_(cc::SolidColorLayer::Create()),
594 cc::SolidColorLayer::Create(cc::LayerSettings())), 593 close_button_(cc::UIResourceLayer::Create()),
595 close_button_( 594 front_border_(cc::NinePatchLayer::Create()),
596 cc::UIResourceLayer::Create(cc::LayerSettings())), 595 front_border_inner_shadow_(cc::NinePatchLayer::Create()),
597 front_border_( 596 contour_shadow_(cc::NinePatchLayer::Create()),
598 cc::NinePatchLayer::Create(cc::LayerSettings())), 597 shadow_(cc::NinePatchLayer::Create()),
599 front_border_inner_shadow_( 598 back_logo_(cc::UIResourceLayer::Create()),
600 cc::NinePatchLayer::Create(cc::LayerSettings())),
601 contour_shadow_(
602 cc::NinePatchLayer::Create(cc::LayerSettings())),
603 shadow_(cc::NinePatchLayer::Create(cc::LayerSettings())),
604 back_logo_(
605 cc::UIResourceLayer::Create(cc::LayerSettings())),
606 brightness_(1.f) { 599 brightness_(1.f) {
607 layer_->AddChild(shadow_); 600 layer_->AddChild(shadow_);
608 layer_->AddChild(contour_shadow_); 601 layer_->AddChild(contour_shadow_);
609 layer_->AddChild(padding_); 602 layer_->AddChild(padding_);
610 layer_->AddChild(content_->layer()); 603 layer_->AddChild(content_->layer());
611 layer_->AddChild(back_logo_); 604 layer_->AddChild(back_logo_);
612 layer_->AddChild(front_border_inner_shadow_); 605 layer_->AddChild(front_border_inner_shadow_);
613 layer_->AddChild(front_border_); 606 layer_->AddChild(front_border_);
614 layer_->AddChild(title_.get()); 607 layer_->AddChild(title_.get());
615 layer_->AddChild(close_button_); 608 layer_->AddChild(close_button_);
(...skipping 25 matching lines...) Expand all
641 title_->AddChild(layer); 634 title_->AddChild(layer);
642 } 635 }
643 } 636 }
644 637
645 if (title) 638 if (title)
646 title->SetUIResourceIds(); 639 title->SetUIResourceIds();
647 } 640 }
648 641
649 } // namespace android 642 } // namespace android
650 } // namespace chrome 643 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698