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;
}
Exemplo n.º 3
0
bool screenIsMonochrome(Widget* widget)
{
    DEVMODE deviceInfo = deviceInfoForWidget(widget);
    return deviceInfo.dmColor == DMCOLOR_MONOCHROME;
}
Exemplo n.º 4
0
int screenDepthPerComponent(Widget* widget)
{
    // FIXME: Assumes RGB -- not sure if this is right.
    DEVMODE deviceInfo = deviceInfoForWidget(widget);
    return deviceInfo.dmBitsPerPel / 3;
}
Exemplo n.º 5
0
int screenDepth(Widget* widget)
{
    DEVMODE deviceInfo = deviceInfoForWidget(widget);
    return deviceInfo.dmBitsPerPel;
}