| OLD | NEW |
| 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 Loading... |
| 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 cc::PaintFlags paint; | 270 cc::PaintFlags flags; |
| 271 paint.setAntiAlias(true); | 271 flags.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 } |
| 281 | 281 |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |