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

Side by Side Diff: ash/common/wm/overview/window_selector_item.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/wm/overview/window_selector.cc ('k') | ash/common/wm/panels/panel_layout_manager.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/wm/overview/window_selector_item.h" 5 #include "ash/common/wm/overview/window_selector_item.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/material_design/material_design_controller.h" 10 #include "ash/common/material_design/material_design_controller.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 // views::View: 261 // views::View:
262 void OnPaint(gfx::Canvas* canvas) override { 262 void OnPaint(gfx::Canvas* canvas) override {
263 views::View::OnPaint(canvas); 263 views::View::OnPaint(canvas);
264 SkScalar radius = SkIntToScalar(corner_radius_); 264 SkScalar radius = SkIntToScalar(corner_radius_);
265 const SkScalar kRadius[8] = {radius, radius, radius, radius, 0, 0, 0, 0}; 265 const SkScalar kRadius[8] = {radius, radius, radius, radius, 0, 0, 0, 0};
266 SkPath path; 266 SkPath path;
267 gfx::Rect bounds(size()); 267 gfx::Rect bounds(size());
268 path.addRoundRect(gfx::RectToSkRect(bounds), kRadius); 268 path.addRoundRect(gfx::RectToSkRect(bounds), kRadius);
269 269
270 SkPaint paint; 270 cc::PaintFlags paint;
271 paint.setAntiAlias(true); 271 paint.setAntiAlias(true);
272 canvas->ClipPath(path, true); 272 canvas->ClipPath(path, true);
273 273
274 SkColor target_color = initial_color_; 274 SkColor target_color = initial_color_;
275 if (target_color_ != target_color) { 275 if (target_color_ != target_color) {
276 target_color = color_utils::AlphaBlend(target_color_, initial_color_, 276 target_color = color_utils::AlphaBlend(target_color_, initial_color_,
277 current_value_); 277 current_value_);
278 } 278 }
279 canvas->DrawColor(target_color); 279 canvas->DrawColor(target_color);
280 } 280 }
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 792
793 gfx::SlideAnimation* WindowSelectorItem::GetBackgroundViewAnimation() { 793 gfx::SlideAnimation* WindowSelectorItem::GetBackgroundViewAnimation() {
794 return background_view_ ? background_view_->animation() : nullptr; 794 return background_view_ ? background_view_->animation() : nullptr;
795 } 795 }
796 796
797 WmWindow* WindowSelectorItem::GetOverviewWindowForMinimizedStateForTest() { 797 WmWindow* WindowSelectorItem::GetOverviewWindowForMinimizedStateForTest() {
798 return transform_window_.GetOverviewWindowForMinimizedState(); 798 return transform_window_.GetOverviewWindowForMinimizedState();
799 } 799 }
800 800
801 } // namespace ash 801 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/overview/window_selector.cc ('k') | ash/common/wm/panels/panel_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698