diff options
author | Jan Holesovsky <kendy@collabora.com> | 2019-11-20 16:06:13 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-11-25 22:31:17 +0100 |
commit | 49002a143a4534df5f6139e07fefd06174621c59 (patch) | |
tree | 6384bb88ac2411d28fa14b92758233e8f69bcd3c /vcl | |
parent | 218856c511c09deb930967ae836cdd8d9e9569cb (diff) |
android: Introduce --enable-android-lok configure switch to fix RGB vs. BGR.
This indicates that the build targets the Online-based Android app, for
which we need to avoid various tweaks that are needed for the 'old'
Android app present in the android/ subdir of core.git.
In particular, the switch used in this patch fixes a RGBA vs. BGRA
confusion that caused yellow <-> cyan switch in the Online-based Android
app.
Change-Id: I5f394868f51ce87013677834cfafb967b9bb333e
Reviewed-on: https://gerrit.libreoffice.org/83342
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/headless/svpgdi.cxx | 4 | ||||
-rw-r--r-- | vcl/inc/headless/svpgdi.hxx | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index ae605252abe7..1b89dde1fac0 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_features.h> + #include <memory> #ifndef IOS #include <headless/svpgdi.hxx> @@ -211,7 +213,7 @@ namespace sal_uInt8* pD = pDst->mpBits + y * pDst->mnScanlineSize; for (long x = 0; x < nWidth; ++x) { -#if defined ANDROID +#if defined(ANDROID) && !HAVE_FEATURE_ANDROID_LOK static_assert((SVP_CAIRO_FORMAT & ~ScanlineFormat::TopDown) == ScanlineFormat::N32BitTcRgba, "Expected SVP_CAIRO_FORMAT set to N32BitTcBgra"); static_assert((SVP_24BIT_FORMAT & ~ScanlineFormat::TopDown) == ScanlineFormat::N24BitTcRgb, "Expected SVP_24BIT_FORMAT set to N24BitTcRgb"); pD[0] = pS[0]; diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index d4f03355258b..9ee269aa18a5 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -24,6 +24,8 @@ #error This file is not for iOS #endif +#include <config_features.h> + #include <osl/endian.h> #include <vcl/sysdata.hxx> #include <vcl/metric.hxx> @@ -41,7 +43,7 @@ //cairo then matches the OpenGL GL_RGBA format so we can use it there //where we don't have GL_BGRA support. // SVP_24BIT_FORMAT is used to store 24-bit images in 3-byte pixels to conserve memory. -#if defined ANDROID +#if defined(ANDROID) && !HAVE_FEATURE_ANDROID_LOK # define SVP_24BIT_FORMAT (ScanlineFormat::N24BitTcRgb | ScanlineFormat::TopDown) # define SVP_CAIRO_FORMAT (ScanlineFormat::N32BitTcRgba | ScanlineFormat::TopDown) # define SVP_CAIRO_BLUE 1 |