summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-04-26 14:10:27 +0200
committerRobin Watts <robin.watts@artifex.com>2018-06-22 16:48:47 +0100
commit7a30381733d7b03d109b85dcfb7b9c71a2d25b21 (patch)
treead6a354fb915ff0102c9c6a2d1f6e8edb08867c6 /platform
parent81a04d9eb885d107aebc9dc00ff17b35a811fd28 (diff)
downloadmupdf-7a30381733d7b03d109b85dcfb7b9c71a2d25b21.tar.xz
gl: Use black backdrop when displaying an inverted (black) page.
Diffstat (limited to 'platform')
-rw-r--r--platform/gl/gl-main.c4
-rw-r--r--platform/gl/gl-ui.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c
index c2697489..c3c95618 100644
--- a/platform/gl/gl-main.c
+++ b/platform/gl/gl-main.c
@@ -1237,6 +1237,10 @@ void do_main(void)
void run_main_loop(void)
{
+ if (currentinvert)
+ glClearColor(0, 0, 0, 1);
+ else
+ glClearColor(0.3f, 0.3f, 0.3f, 1);
ui_begin();
fz_try(ctx)
{
diff --git a/platform/gl/gl-ui.c b/platform/gl/gl-ui.c
index 3ae7f6b5..5fcede1b 100644
--- a/platform/gl/gl-ui.c
+++ b/platform/gl/gl-ui.c
@@ -457,7 +457,6 @@ void ui_begin(void)
ui.overlay = 0;
glViewport(0, 0, ui.window_w, ui.window_h);
- glClearColor(0.3f, 0.3f, 0.3f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);