summaryrefslogtreecommitdiffstatsci
path: root/src/skia-glx.cpp
diff options
context:
space:
mode:
authorBryce Harrington <b.harrington@samsung.com>2014-03-20 23:41:00 -0700
committerBryce Harrington <b.harrington@samsung.com>2014-03-20 23:41:00 -0700
commitf0c44e01287e153c1cccbb0e12d53cc3b1c0ebce (patch)
tree1400f157e0644b4067fbe0f766ffff77e9faead8 /src/skia-glx.cpp
parentb56dc8ecba6265c2efd4eff28bfc4d269fd1d906 (diff)
Fix failure to run in EGL mode
In addition to breaking out the cairo and skia claims on the egl context separately, we also need to call eglMakeCurrent and eglSwapBuffers so that it will actually draw to the screen.
Diffstat (limited to 'src/skia-glx.cpp')
-rw-r--r--src/skia-glx.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/skia-glx.cpp b/src/skia-glx.cpp
index ff24130..daaa49d 100644
--- a/src/skia-glx.cpp
+++ b/src/skia-glx.cpp
@@ -9,6 +9,7 @@
#include "glx.h"
static glx_state_t *state;
+GrContext* ctx;
static bool ctxErrorOccurred = false;
static int ctxErrorHandler(Display *dpy, XErrorEvent *ev)
@@ -21,7 +22,6 @@ SkBaseDevice *
create_skia_device_glx (int width, int height)
{
GrBackendRenderTargetDesc desc;
- GrContext* ctx;
GrRenderTarget* target;
SkGpuDevice *device;
@@ -83,11 +83,13 @@ create_skia_device_glx (int width, int height)
void
destroy_skia_glx(void)
{
+ delete ctx;
cleanup_state_glx(state);
}
void
update_skia_glx(void)
{
+ ctx->flush();
}