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

Side by Side Diff: ui/app_list/views/folder_background_view.cc

Issue 2716213002: ui: Fix cc/paint skia type mismatches (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/app_list/views/folder_background_view.h" 5 #include "ui/app_list/views/folder_background_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/app_list/app_list_constants.h" 9 #include "ui/app_list/app_list_constants.h"
10 #include "ui/app_list/views/app_list_folder_view.h" 10 #include "ui/app_list/views/app_list_folder_view.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 int FolderBackgroundView::GetFolderContainerBubbleRadius() const { 72 int FolderBackgroundView::GetFolderContainerBubbleRadius() const {
73 return std::max(GetContentsBounds().width(), GetContentsBounds().height()) / 73 return std::max(GetContentsBounds().width(), GetContentsBounds().height()) /
74 2; 74 2;
75 } 75 }
76 76
77 void FolderBackgroundView::OnPaint(gfx::Canvas* canvas) { 77 void FolderBackgroundView::OnPaint(gfx::Canvas* canvas) {
78 if (show_state_ == NO_BUBBLE) 78 if (show_state_ == NO_BUBBLE)
79 return; 79 return;
80 80
81 // Draw ink bubble that shows the folder boundary. 81 // Draw ink bubble that shows the folder boundary.
82 SkPaint paint; 82 cc::PaintFlags flags;
83 paint.setStyle(SkPaint::kFill_Style); 83 flags.setStyle(cc::PaintFlags::kFill_Style);
84 paint.setAntiAlias(true); 84 flags.setAntiAlias(true);
85 paint.setColor(kFolderBubbleColor); 85 flags.setColor(kFolderBubbleColor);
86 canvas->DrawCircle(GetContentsBounds().CenterPoint(), 86 canvas->DrawCircle(GetContentsBounds().CenterPoint(),
87 GetFolderContainerBubbleRadius(), 87 GetFolderContainerBubbleRadius(), flags);
88 paint);
89 } 88 }
90 89
91 void FolderBackgroundView::OnImplicitAnimationsCompleted() { 90 void FolderBackgroundView::OnImplicitAnimationsCompleted() {
92 // Show folder name after the ink bubble disappears. 91 // Show folder name after the ink bubble disappears.
93 if (show_state_ == HIDE_BUBBLE) { 92 if (show_state_ == HIDE_BUBBLE) {
94 static_cast<AppsContainerView*>(parent())->app_list_folder_view()-> 93 static_cast<AppsContainerView*>(parent())->app_list_folder_view()->
95 UpdateFolderNameVisibility(true); 94 UpdateFolderNameVisibility(true);
96 } 95 }
97 } 96 }
98 97
99 } // namespace app_list 98 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698