Commit fd582981 authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Support BGRA 30bpp visuals for X11 software rendering

At least with Intel drivers, deepcolor visuals may be of BGR format
isntead of RGB like on Nvidia.  Skia recently added support for
30bpp BGR formats [1], so use this new format to support this
configuration.

[1] https://skia.googlesource.com/skia/+/f7eb0544a8853eb087e20a0e5e7bc3597de02074

R=mtklein

Bug: 1016383
Change-Id: I22ffd649f7cfd7c6ed132250dee35c7960210fa6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2052206
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740804}
parent 743c301d
...@@ -1313,6 +1313,7 @@ SkColorType ColorTypeForVisual(void* visual) { ...@@ -1313,6 +1313,7 @@ SkColorType ColorTypeForVisual(void* visual) {
{kRGBA_8888_SkColorType, 0xff, 0xff00, 0xff0000}, {kRGBA_8888_SkColorType, 0xff, 0xff00, 0xff0000},
{kBGRA_8888_SkColorType, 0xff0000, 0xff00, 0xff}, {kBGRA_8888_SkColorType, 0xff0000, 0xff00, 0xff},
{kRGBA_1010102_SkColorType, 0x3ff, 0xffc00, 0x3ff00000}, {kRGBA_1010102_SkColorType, 0x3ff, 0xffc00, 0x3ff00000},
{kBGRA_1010102_SkColorType, 0x3ff00000, 0xffc00, 0x3ff},
}; };
Visual* vis = reinterpret_cast<Visual*>(visual); Visual* vis = reinterpret_cast<Visual*>(visual);
for (const auto& color_info : color_infos) { for (const auto& color_info : color_infos) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment