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

Side by Side Diff: ash/common/system/chromeos/network/network_icon.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_widget.cc ('k') | ash/common/system/toast/toast_overlay.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/system/chromeos/network/network_icon.h" 5 #include "ash/common/system/chromeos/network/network_icon.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/system/chromeos/network/network_icon_animation.h" 8 #include "ash/common/system/chromeos/network/network_icon_animation.h"
9 #include "ash/common/system/chromeos/network/network_icon_animation_observer.h" 9 #include "ash/common/system/chromeos/network/network_icon_animation_observer.h"
10 #include "ash/common/system/tray/tray_constants.h" 10 #include "ash/common/system/tray/tray_constants.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 auto make_triangle = [scale, kFullTriangleSide](SkScalar side) { 389 auto make_triangle = [scale, kFullTriangleSide](SkScalar side) {
390 SkPath triangle; 390 SkPath triangle;
391 triangle.moveTo(scale(kIconInset), scale(kIconInset + kFullTriangleSide)); 391 triangle.moveTo(scale(kIconInset), scale(kIconInset + kFullTriangleSide));
392 triangle.rLineTo(scale(side), 0); 392 triangle.rLineTo(scale(side), 0);
393 triangle.rLineTo(0, -scale(side)); 393 triangle.rLineTo(0, -scale(side));
394 triangle.close(); 394 triangle.close();
395 return triangle; 395 return triangle;
396 }; 396 };
397 397
398 SkPaint paint; 398 cc::PaintFlags paint;
399 paint.setAntiAlias(true); 399 paint.setAntiAlias(true);
400 paint.setStyle(SkPaint::kFill_Style); 400 paint.setStyle(cc::PaintFlags::kFill_Style);
401 // Background. Skip drawing for full signal. 401 // Background. Skip drawing for full signal.
402 if (signal_strength_ != kNumNetworkImages - 1) { 402 if (signal_strength_ != kNumNetworkImages - 1) {
403 paint.setColor(SkColorSetA(color_, kBgAlpha)); 403 paint.setColor(SkColorSetA(color_, kBgAlpha));
404 canvas->DrawPath(make_triangle(kFullTriangleSide), paint); 404 canvas->DrawPath(make_triangle(kFullTriangleSide), paint);
405 } 405 }
406 // Foreground (signal strength). 406 // Foreground (signal strength).
407 if (signal_strength_ != 0) { 407 if (signal_strength_ != 0) {
408 paint.setColor(color_); 408 paint.setColor(color_);
409 // As a percentage of the bg triangle, the length of one of the short 409 // As a percentage of the bg triangle, the length of one of the short
410 // sides of the fg triangle, indexed by signal strength. 410 // sides of the fg triangle, indexed by signal strength.
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 network_paths.insert((*iter)->path()); 1090 network_paths.insert((*iter)->path());
1091 } 1091 }
1092 PurgeIconMap(ICON_TYPE_TRAY, network_paths); 1092 PurgeIconMap(ICON_TYPE_TRAY, network_paths);
1093 PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths); 1093 PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths);
1094 PurgeIconMap(ICON_TYPE_LIST, network_paths); 1094 PurgeIconMap(ICON_TYPE_LIST, network_paths);
1095 PurgeIconMap(ICON_TYPE_MENU_LIST, network_paths); 1095 PurgeIconMap(ICON_TYPE_MENU_LIST, network_paths);
1096 } 1096 }
1097 1097
1098 } // namespace network_icon 1098 } // namespace network_icon
1099 } // namespace ash 1099 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_widget.cc ('k') | ash/common/system/toast/toast_overlay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698