From b0f53324a79dbc3f23d4e068aa75b036055538aa Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 13 Apr 2016 10:17:59 -0300 Subject: [PATCH] Extra checks for an initialized SkiaDisplay for GPU support on OS X --- src/she/skia/skia_window_osx.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/she/skia/skia_window_osx.mm b/src/she/skia/skia_window_osx.mm index c5ee19d50..7ce986bc9 100644 --- a/src/she/skia/skia_window_osx.mm +++ b/src/she/skia/skia_window_osx.mm @@ -139,7 +139,7 @@ public: } #if SK_SUPPORT_GPU - if (m_glCtx) + if (m_glCtx && m_display->isInitialized()) createRenderTarget(size); #endif @@ -149,7 +149,7 @@ public: void onDrawRect(const gfx::Rect& rect) override { #if SK_SUPPORT_GPU // Flush operations to the SkCanvas - { + if (m_display->isInitialized()) { SkiaSurface* surface = static_cast(m_display->getSurface()); surface->flush(); }