Add GL_APPLE_sync support
While debugging Flutter iOS issues, I realized that they weren't getting cross context images (we were just passing around codec backed images). Bug: skia: Change-Id: I6190b24eb281e839659d28767f9a0b31c05f13e0 Reviewed-on: https://skia-review.googlesource.com/20450 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
a2cebd8330
commit
93a2346dfa
@ -938,6 +938,11 @@ const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) {
|
|||||||
GET_PROC(ClientWaitSync);
|
GET_PROC(ClientWaitSync);
|
||||||
GET_PROC(WaitSync);
|
GET_PROC(WaitSync);
|
||||||
GET_PROC(DeleteSync);
|
GET_PROC(DeleteSync);
|
||||||
|
} else if (extensions.has("GL_APPLE_sync")) {
|
||||||
|
GET_PROC_SUFFIX(FenceSync, APPLE);
|
||||||
|
GET_PROC_SUFFIX(ClientWaitSync, APPLE);
|
||||||
|
GET_PROC_SUFFIX(WaitSync, APPLE);
|
||||||
|
GET_PROC_SUFFIX(DeleteSync, APPLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version >= GR_GL_VER(3, 1)) {
|
if (version >= GR_GL_VER(3, 1)) {
|
||||||
|
@ -612,7 +612,7 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
|
|||||||
if (version >= GR_GL_VER(3, 2) || ctxInfo.hasExtension("GL_ARB_sync")) {
|
if (version >= GR_GL_VER(3, 2) || ctxInfo.hasExtension("GL_ARB_sync")) {
|
||||||
fFenceSyncSupport = true;
|
fFenceSyncSupport = true;
|
||||||
}
|
}
|
||||||
} else if (version >= GR_GL_VER(3, 0)) {
|
} else if (version >= GR_GL_VER(3, 0) || ctxInfo.hasExtension("GL_APPLE_sync")) {
|
||||||
fFenceSyncSupport = true;
|
fFenceSyncSupport = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -764,7 +764,7 @@ bool GrGLInterface::validate() const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (kGLES_GrGLStandard == fStandard) {
|
} else if (kGLES_GrGLStandard == fStandard) {
|
||||||
if (glVer >= GR_GL_VER(3, 0)) {
|
if (glVer >= GR_GL_VER(3, 0) || fExtensions.has("GL_APPLE_sync")) {
|
||||||
if (nullptr == fFunctions.fFenceSync ||
|
if (nullptr == fFunctions.fFenceSync ||
|
||||||
nullptr == fFunctions.fClientWaitSync ||
|
nullptr == fFunctions.fClientWaitSync ||
|
||||||
nullptr == fFunctions.fWaitSync ||
|
nullptr == fFunctions.fWaitSync ||
|
||||||
|
Loading…
Reference in New Issue
Block a user