hud_constants.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_HUD_DISPLAY_HUD_CONSTANTS_H_
  5. #define ASH_HUD_DISPLAY_HUD_CONSTANTS_H_
  6. #include "third_party/skia/include/core/SkColor.h"
  7. namespace ash {
  8. namespace hud_display {
  9. constexpr SkAlpha kHUDAlpha = 204; // = 0.8 * 255
  10. // Use light orange color.
  11. constexpr SkColor kHUDDefaultColor =
  12. SkColorSetARGB(kHUDAlpha, 0xFF, 0xB2, 0x66);
  13. constexpr SkColor kHUDBackground = SkColorSetARGB(kHUDAlpha, 17, 17, 17);
  14. constexpr SkColor kHUDLegendBackground = kHUDBackground;
  15. // Radius of rounded corners for tabs.
  16. // Must be divisible by 3 to make kTabOverlayWidth an integer.
  17. constexpr int kHUDTabOverlayCornerRadius = 9;
  18. // Border around settings icon in the settings button.
  19. constexpr int kHUDSettingsIconBorder = 5;
  20. // Settings button icon size.
  21. constexpr int kHUDSettingsIconSize = 18;
  22. // Visible border inside the |HUDDisplayView| rectangle around contents.
  23. // |HUDDisplayView| does not use insets itself. Children substitute this inset
  24. // where needed.
  25. constexpr int kHUDInset = 5;
  26. // Defines both the pixel width of the graphs and the amount of data stored
  27. // in each graph ring buffer.
  28. static constexpr size_t kHUDGraphWidth = 190;
  29. // Thickness of reference lines on and around the graphs.
  30. constexpr int kHUDGraphReferenceLineWidth = 1;
  31. // HUD display modes.
  32. enum class HUDDisplayMode {
  33. CPU = 1, // First value should be different from default Views::ID = 0.
  34. MEMORY,
  35. FPS,
  36. };
  37. } // namespace hud_display
  38. } // namespace ash
  39. #endif // ASH_HUD_DISPLAY_HUD_CONSTANTS_H_