Index: ui/app_list/views/apps_grid_view.cc |
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc |
index 651a5069d00c23cc92c6cc2860fd01c2a13ef0eb..ddc1337ba16ec16ce6ce23b284e194da3660aa01 100644 |
--- a/ui/app_list/views/apps_grid_view.cc |
+++ b/ui/app_list/views/apps_grid_view.cc |
@@ -24,6 +24,7 @@ |
#include "ui/events/event.h" |
#include "ui/gfx/animation/animation.h" |
#include "ui/views/border.h" |
+#include "ui/views/controls/label.h" |
#include "ui/views/view_model_utils.h" |
#include "ui/views/widget/widget.h" |
@@ -73,9 +74,6 @@ const int kPageFlipZoneSize = 40; |
// Delay in milliseconds to do the page flip. |
const int kPageFlipDelayInMs = 1000; |
-// How many pages on either side of the selected one we prerender. |
-const int kPrerenderPages = 1; |
- |
// The drag and drop proxy should get scaled by this factor. |
const float kDragAndDropProxyScale = 1.5f; |
@@ -837,13 +835,6 @@ void AppsGridView::SetDragAndDropHostOfCurrentAppList( |
void AppsGridView::Prerender(int page_index) { |
Layout(); |
- int start = std::max(0, (page_index - kPrerenderPages) * tiles_per_page()); |
- int end = std::min(view_model_.view_size(), |
- (page_index + 1 + kPrerenderPages) * tiles_per_page()); |
- for (int i = start; i < end; i++) { |
- AppListItemView* v = static_cast<AppListItemView*>(view_model_.view_at(i)); |
- v->Prerender(); |
- } |
} |
bool AppsGridView::IsAnimatingView(views::View* view) { |
@@ -1012,8 +1003,7 @@ views::View* AppsGridView::CreateViewForItemAtIndex(size_t index) { |
// The drag_view_ might be pending for deletion, therefore view_model_ |
// may have one more item than item_list_. |
DCHECK_LE(index, item_list_->item_count()); |
- AppListItemView* view = new AppListItemView(this, |
- item_list_->item_at(index)); |
+ AppListItemView* view = new AppListItemView(this, item_list_->item_at(index)); |
view->SetIconSize(icon_size_); |
view->SetPaintToLayer(true); |
view->SetFillsBoundsOpaquely(false); |