mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 881169 - Fix SharedSurface_Gralloc::Create crash due to null allocator. r=vlad
When skiaGL enabled, pass ISurfaceAllocator to gralloc backend for gl streaming
This commit is contained in:
parent
2852502e28
commit
fcb189d8ac
@ -107,6 +107,10 @@
|
||||
#include "gfxWindowsPlatform.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include "mozilla/layers/ShadowLayers.h"
|
||||
#endif
|
||||
|
||||
// windows.h (included by chromium code) defines this, in its infinite wisdom
|
||||
#undef DrawText
|
||||
|
||||
@ -783,6 +787,13 @@ CanvasRenderingContext2D::EnsureTarget()
|
||||
SurfaceCaps caps = SurfaceCaps::ForRGBA();
|
||||
caps.preserve = true;
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
layers::ShadowLayerForwarder *forwarder = layerManager->AsShadowForwarder();
|
||||
if (forwarder) {
|
||||
caps.surfaceAllocator = static_cast<layers::ISurfaceAllocator*>(forwarder);
|
||||
}
|
||||
#endif
|
||||
|
||||
mGLContext = mozilla::gl::GLContextProvider::CreateOffscreen(gfxIntSize(size.width,
|
||||
size.height),
|
||||
caps,
|
||||
|
Loading…
Reference in New Issue
Block a user