mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-26 00:19:13 +00:00
Extra checks for an initialized SkiaDisplay for GPU support on OS X
This commit is contained in:
parent
99d7eb5391
commit
b0f53324a7
@ -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<SkiaSurface*>(m_display->getSurface());
|
||||
surface->flush();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user