Internal change
PiperOrigin-RevId: 489091534
This commit is contained in:
parent
e66e88802c
commit
6fc277ee1c
|
@ -826,10 +826,14 @@ std::shared_ptr<GlSyncPoint> GlContext::CreateSyncToken() {
|
|||
return token;
|
||||
}
|
||||
|
||||
bool GlContext::IsAnyContextCurrent() {
|
||||
PlatformGlContext GlContext::GetCurrentNativeContext() {
|
||||
ContextBinding ctx;
|
||||
GetCurrentContextBinding(&ctx);
|
||||
return ctx.context != kPlatformGlContextNone;
|
||||
return ctx.context;
|
||||
}
|
||||
|
||||
bool GlContext::IsAnyContextCurrent() {
|
||||
return GetCurrentNativeContext() != kPlatformGlContextNone;
|
||||
}
|
||||
|
||||
std::shared_ptr<GlSyncPoint>
|
||||
|
|
|
@ -307,6 +307,10 @@ class GlContext : public std::enable_shared_from_this<GlContext> {
|
|||
// the GlContext class, is current.
|
||||
static bool IsAnyContextCurrent();
|
||||
|
||||
// Returns the current native context, whether managed by this class or not.
|
||||
// Useful as a cross-platform way to get the current PlatformGlContext.
|
||||
static PlatformGlContext GetCurrentNativeContext();
|
||||
|
||||
// Creates a synchronization token for the current, non-GlContext-owned
|
||||
// context. This can be passed to MediaPipe so it can synchronize with the
|
||||
// commands issued in the external context up to this point.
|
||||
|
|
Loading…
Reference in New Issue
Block a user