summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-11-22 12:30:16 +0100
committerLuboš Luňák <l.lunak@collabora.com>2019-11-27 09:55:18 +0100
commite8b9dbbc78b3dc4124fbabfef54b686b2bec0843 (patch)
treed0893ee9c63dc8b34ca6103a74af5584d2ec14bb
parent84f84f59ce7c83a99e4e340071d58b6557dbe91a (diff)
use the native Skia color Type when using Vulkan
Change-Id: Ie46d7d89b9aa149f48617ccdbe3a8c492759880f
-rw-r--r--vcl/skia/x11/gdiimpl.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/vcl/skia/x11/gdiimpl.cxx b/vcl/skia/x11/gdiimpl.cxx
index 3f706399f136..04e2586e7f7a 100644
--- a/vcl/skia/x11/gdiimpl.cxx
+++ b/vcl/skia/x11/gdiimpl.cxx
@@ -41,12 +41,7 @@ void X11SkiaSalGraphicsImpl::Init()
void X11SkiaSalGraphicsImpl::createWindowContext()
{
sk_app::DisplayParams displayParams;
- // Use a macro to hide an unreachable code warning.
- // TODO The Skia Xlib code actually requires the non-native color type to work properly.
-#define GET_FORMAT \
- kN32_SkColorType == kBGRA_8888_SkColorType ? kRGBA_8888_SkColorType : kBGRA_8888_SkColorType
- displayParams.fColorType = GET_FORMAT;
-#undef GET_FORMAT
+ displayParams.fColorType = kN32_SkColorType;
sk_app::window_context_factory::XlibWindowInfo winInfo;
winInfo.fDisplay = mX11Parent.GetXDisplay();
winInfo.fWindow = mX11Parent.GetDrawable();
@@ -68,6 +63,10 @@ void X11SkiaSalGraphicsImpl::createWindowContext()
switch (SkiaHelper::renderMethodToUse())
{
case SkiaHelper::RenderRaster:
+ // TODO The Skia Xlib code actually requires the non-native color type to work properly.
+ displayParams.fColorType
+ = (displayParams.fColorType == kBGRA_8888_SkColorType ? kRGBA_8888_SkColorType
+ : kBGRA_8888_SkColorType);
mWindowContext
= sk_app::window_context_factory::MakeRasterForXlib(winInfo, displayParams);
mIsGPU = false;