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

Unified Diff: ui/display/display.cc

Issue 2151563002: Add the fields bits-per-pixel and bits-per-component to Display. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/display/display.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/display.cc
diff --git a/ui/display/display.cc b/ui/display/display.cc
index 661d7dae0788a248e451dd6c94ae52d41a0190fc..3a5433fe4d3c3953d766ea8d2b561111384de490 100644
--- a/ui/display/display.cc
+++ b/ui/display/display.cc
@@ -73,11 +73,16 @@ void Display::ResetForceDeviceScaleFactorForTesting() {
g_forced_device_scale_factor = -1.0;
}
+constexpr int DEFAULT_BITS_PER_PIXEL = 24;
+constexpr int DEFAULT_BITS_PER_COMPONENT = 8;
+
Display::Display()
: id_(kInvalidDisplayID),
device_scale_factor_(GetForcedDeviceScaleFactor()),
rotation_(ROTATE_0),
- touch_support_(TOUCH_SUPPORT_UNKNOWN) {}
+ touch_support_(TOUCH_SUPPORT_UNKNOWN),
+ color_depth_(DEFAULT_BITS_PER_PIXEL),
+ depth_per_component_(DEFAULT_BITS_PER_COMPONENT) {}
Display::Display(const Display& other) = default;
@@ -85,7 +90,9 @@ Display::Display(int64_t id)
: id_(id),
device_scale_factor_(GetForcedDeviceScaleFactor()),
rotation_(ROTATE_0),
- touch_support_(TOUCH_SUPPORT_UNKNOWN) {}
+ touch_support_(TOUCH_SUPPORT_UNKNOWN),
+ color_depth_(DEFAULT_BITS_PER_PIXEL),
+ depth_per_component_(DEFAULT_BITS_PER_COMPONENT) {}
Display::Display(int64_t id, const gfx::Rect& bounds)
: id_(id),
@@ -93,7 +100,9 @@ Display::Display(int64_t id, const gfx::Rect& bounds)
work_area_(bounds),
device_scale_factor_(GetForcedDeviceScaleFactor()),
rotation_(ROTATE_0),
- touch_support_(TOUCH_SUPPORT_UNKNOWN) {
+ touch_support_(TOUCH_SUPPORT_UNKNOWN),
+ color_depth_(DEFAULT_BITS_PER_PIXEL),
+ depth_per_component_(DEFAULT_BITS_PER_COMPONENT) {
#if defined(USE_AURA)
SetScaleAndBounds(device_scale_factor_, bounds);
#endif
« no previous file with comments | « ui/display/display.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698