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

Unified Diff: ui/app_list/views/start_page_view.cc

Issue 2701123002: AppList Performance Optimization 2 (Closed)
Patch Set: Cache the tokenized name Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/search_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/start_page_view.cc
diff --git a/ui/app_list/views/start_page_view.cc b/ui/app_list/views/start_page_view.cc
index fb1977727114d4635b65d19977d4974c73262f09..f7a48f5c900e6a2109be35841165c41bc0c2ed68 100644
--- a/ui/app_list/views/start_page_view.cc
+++ b/ui/app_list/views/start_page_view.cc
@@ -202,7 +202,6 @@ int StartPageView::StartPageTilesContainer::DoUpdate() {
search_result_tile_views_[i]->SetEnabled(true);
}
- Layout();
parent()->Layout();
// Add 1 to the results size to account for the all apps button.
return display_results.size() + 1;
@@ -249,6 +248,7 @@ void StartPageView::StartPageTilesContainer::CreateAppsGrid(int apps_num) {
// Add SearchResultTileItemViews to the container.
int i = 0;
+ search_result_tile_views_.reserve(apps_num);
for (; i < apps_num; ++i) {
SearchResultTileItemView* tile_item =
new SearchResultTileItemView(this, view_delegate_);
@@ -258,7 +258,7 @@ void StartPageView::StartPageTilesContainer::CreateAppsGrid(int apps_num) {
AddChildView(tile_item);
tile_item->SetParentBackgroundColor(kLabelBackgroundColor);
tile_item->SetHoverStyle(TileItemView::HOVER_STYLE_ANIMATE_SHADOW);
- search_result_tile_views_.push_back(tile_item);
+ search_result_tile_views_.emplace_back(tile_item);
}
// Also add a special "all apps" button to the end of the container.
@@ -294,7 +294,6 @@ StartPageView::StartPageView(AppListMainView* app_list_main_view,
AddChildView(custom_launcher_page_background_);
tiles_container_->SetResults(view_delegate_->GetModel()->results());
- Reset();
}
StartPageView::~StartPageView() {
« no previous file with comments | « ui/app_list/search_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698