Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions tensorflow_graphics/rendering/opengl/egl_offscreen_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ EGLOffscreenContext::EGLOffscreenContext(EGLContext context, EGLDisplay display,

EGLOffscreenContext::~EGLOffscreenContext() { TF_CHECK_OK(Destroy()); }

tensorflow::Status EGLOffscreenContext::Create(
absl::Status EGLOffscreenContext::Create(
std::unique_ptr<EGLOffscreenContext>* egl_offscreen_context) {
constexpr std::array<int, 13> kDefaultConfigurationAttributes = {
EGL_SURFACE_TYPE,
Expand All @@ -56,7 +56,7 @@ tensorflow::Status EGLOffscreenContext::Create(
kDefaultContextAttributes.data(), egl_offscreen_context);
}

tensorflow::Status EGLOffscreenContext::Create(
absl::Status EGLOffscreenContext::Create(
const int pixel_buffer_width, const int pixel_buffer_height,
const EGLenum rendering_api, const EGLint* configuration_attributes,
const EGLint* context_attributes,
Expand Down Expand Up @@ -112,10 +112,10 @@ tensorflow::Status EGLOffscreenContext::Create(
surface_cleanup.release();
*egl_offscreen_context = std::unique_ptr<EGLOffscreenContext>(
new EGLOffscreenContext(context, display, pixel_buffer_surface));
return tensorflow::Status();
return absl::Status();
}

tensorflow::Status EGLOffscreenContext::Destroy() {
absl::Status EGLOffscreenContext::Destroy() {
TF_RETURN_IF_ERROR(Release());
if (eglDestroyContext(display_, context_) == false) {
return TFG_INTERNAL_ERROR("an error occured in eglDestroyContext.");
Expand All @@ -127,19 +127,19 @@ tensorflow::Status EGLOffscreenContext::Destroy() {
return TFG_INTERNAL_ERROR(
"an error occured in TerminateInitializedEGLDisplay.");
}
return tensorflow::Status();
return absl::Status();
}

tensorflow::Status EGLOffscreenContext::MakeCurrent() const {
absl::Status EGLOffscreenContext::MakeCurrent() const {
TFG_RETURN_IF_EGL_ERROR(eglMakeCurrent(display_, pixel_buffer_surface_,
pixel_buffer_surface_, context_));
return tensorflow::Status();
return absl::Status();
}

tensorflow::Status EGLOffscreenContext::Release() {
absl::Status EGLOffscreenContext::Release() {
if (context_ != EGL_NO_CONTEXT && context_ == eglGetCurrentContext()) {
TFG_RETURN_IF_EGL_ERROR(eglMakeCurrent(display_, EGL_NO_SURFACE,
EGL_NO_SURFACE, EGL_NO_CONTEXT));
}
return tensorflow::Status();
return absl::Status();
}
Loading