aboutsummaryrefslogtreecommitdiff
path: root/src/libANGLE/Display.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libANGLE/Display.cpp')
-rw-r--r--src/libANGLE/Display.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libANGLE/Display.cpp b/src/libANGLE/Display.cpp
index bd2bd59d77..d7b75bf625 100644
--- a/src/libANGLE/Display.cpp
+++ b/src/libANGLE/Display.cpp
@@ -1325,7 +1325,7 @@ Error Display::createPixmapSurface(const Config *configuration,
return NoError();
}
-Error Display::createImage(const gl::Context *context,
+Error Display::createImage(gl::Context *context,
EGLenum target,
EGLClientBuffer buffer,
const AttributeMap &attribs,
@@ -1357,6 +1357,13 @@ Error Display::createImage(const gl::Context *context,
}
ASSERT(sibling != nullptr);
+ if (context)
+ {
+ // If the source comes from a context, make sure it's marked as shared because its resources
+ // can now be used by contects outside of its share group.
+ context->setShared();
+ }
+
angle::UniqueObjectPointer<Image, Display> imagePtr(
new Image(mImplementation, context, target, sibling, attribs), this);
ANGLE_TRY(imagePtr->initialize(this));