bool screenIsMonochrome(Widget* widget) { #if OS(WINCE) // EnumDisplaySettings doesn't set dmColor in DEVMODE. return false; #else DEVMODE deviceInfo = deviceInfoForWidget(widget); return deviceInfo.dmColor == DMCOLOR_MONOCHROME; #endif }
int screenDepth(Widget* widget) { DEVMODE deviceInfo = deviceInfoForWidget(widget); if (deviceInfo.dmBitsPerPel == 32) { // Some video drivers return 32, but this function is supposed to ignore the alpha // component. See <http://webkit.org/b/42972>. return 24; } return deviceInfo.dmBitsPerPel; }
bool screenIsMonochrome(Widget* widget) { DEVMODE deviceInfo = deviceInfoForWidget(widget); return deviceInfo.dmColor == DMCOLOR_MONOCHROME; }
int screenDepthPerComponent(Widget* widget) { // FIXME: Assumes RGB -- not sure if this is right. DEVMODE deviceInfo = deviceInfoForWidget(widget); return deviceInfo.dmBitsPerPel / 3; }
int screenDepth(Widget* widget) { DEVMODE deviceInfo = deviceInfoForWidget(widget); return deviceInfo.dmBitsPerPel; }