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

Side by Side Diff: ash/common/shelf/shelf_widget.cc

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem 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 unified diff | Download patch
« no previous file with comments | « ash/common/shelf/shelf_button.cc ('k') | ash/common/system/chromeos/network/network_icon.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "ash/common/shelf/shelf_widget.h" 5 #include "ash/common/shelf/shelf_widget.h"
6 6
7 #include "ash/common/focus_cycler.h" 7 #include "ash/common/focus_cycler.h"
8 #include "ash/common/material_design/material_design_controller.h" 8 #include "ash/common/material_design/material_design_controller.h"
9 #include "ash/common/session/session_state_delegate.h" 9 #include "ash/common/session/session_state_delegate.h"
10 #include "ash/common/shelf/app_list_button.h" 10 #include "ash/common/shelf/app_list_button.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 *rb->GetImageSkiaNamed(IDR_ASH_SHELF_BACKGROUND); 133 *rb->GetImageSkiaNamed(IDR_ASH_SHELF_BACKGROUND);
134 const bool horizontal = wm_shelf_->IsHorizontalAlignment(); 134 const bool horizontal = wm_shelf_->IsHorizontalAlignment();
135 if (!horizontal) { 135 if (!horizontal) {
136 shelf_background = gfx::ImageSkiaOperations::CreateRotatedImage( 136 shelf_background = gfx::ImageSkiaOperations::CreateRotatedImage(
137 shelf_background, wm_shelf_->GetAlignment() == SHELF_ALIGNMENT_LEFT 137 shelf_background, wm_shelf_->GetAlignment() == SHELF_ALIGNMENT_LEFT
138 ? SkBitmapOperations::ROTATION_90_CW 138 ? SkBitmapOperations::ROTATION_90_CW
139 : SkBitmapOperations::ROTATION_270_CW); 139 : SkBitmapOperations::ROTATION_270_CW);
140 } 140 }
141 const gfx::Rect dock_bounds( 141 const gfx::Rect dock_bounds(
142 shelf_widget_->shelf_layout_manager()->dock_bounds()); 142 shelf_widget_->shelf_layout_manager()->dock_bounds());
143 SkPaint paint; 143 cc::PaintFlags paint;
144 paint.setAlpha(asset_background_alpha_); 144 paint.setAlpha(asset_background_alpha_);
145 canvas->DrawImageInt( 145 canvas->DrawImageInt(
146 shelf_background, 0, 0, shelf_background.width(), 146 shelf_background, 0, 0, shelf_background.width(),
147 shelf_background.height(), 147 shelf_background.height(),
148 (horizontal && dock_bounds.x() == 0 && dock_bounds.width() > 0) 148 (horizontal && dock_bounds.x() == 0 && dock_bounds.width() > 0)
149 ? dock_bounds.width() 149 ? dock_bounds.width()
150 : 0, 150 : 0,
151 0, horizontal ? width() - dock_bounds.width() : width(), height(), false, 151 0, horizontal ? width() - dock_bounds.width() : width(), height(), false,
152 paint); 152 paint);
153 if (horizontal && dock_bounds.width() > 0) { 153 if (horizontal && dock_bounds.width() > 0) {
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 if (shelf_view_) 436 if (shelf_view_)
437 shelf_view_->UpdateShelfItemBackground(alpha); 437 shelf_view_->UpdateShelfItemBackground(alpha);
438 } 438 }
439 439
440 void ShelfWidget::WillDeleteShelfLayoutManager() { 440 void ShelfWidget::WillDeleteShelfLayoutManager() {
441 shelf_layout_manager_->RemoveObserver(this); 441 shelf_layout_manager_->RemoveObserver(this);
442 shelf_layout_manager_ = nullptr; 442 shelf_layout_manager_ = nullptr;
443 } 443 }
444 444
445 } // namespace ash 445 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_button.cc ('k') | ash/common/system/chromeos/network/network_icon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698