Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Code Change #5319

Closed
wants to merge 1 commit into from
Closed
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/rasterizer_with_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RasterizerWithContext::RasterizerWithContext(
RasterizerWithContext::~RasterizerWithContext() {
// Destroy the rasterizer in the correct EGL context.
auto status = egl_context_->MakeCurrent();
if (status != tensorflow::Status())
if (status != absl::Status())
std::cerr
<< "~RasterizerWithContext: failure to set the context as current."
<< std::endl;
Expand All @@ -39,7 +39,7 @@ RasterizerWithContext::~RasterizerWithContext() {
// egl_offscreen_context::Release().
}

tensorflow::Status RasterizerWithContext::Create(
absl::Status RasterizerWithContext::Create(
int width, int height, const std::string& vertex_shader_source,
const std::string& geometry_shader_source,
const std::string& fragment_shader_source,
Expand Down Expand Up @@ -69,25 +69,25 @@ tensorflow::Status RasterizerWithContext::Create(
std::move(offscreen_context), std::move(program),
std::move(render_targets), clear_red, clear_green, clear_blue,
clear_alpha, clear_depth, enable_cull_face));
return tensorflow::Status();
return absl::Status();
}

tensorflow::Status RasterizerWithContext::Render(int num_points,
absl::Span<float> result) {
absl::Status RasterizerWithContext::Render(int num_points,
absl::Span<float> result) {
TF_RETURN_IF_ERROR(egl_context_->MakeCurrent());
auto context_cleanup =
MakeCleanup([this]() { return this->egl_context_->Release(); });
TF_RETURN_IF_ERROR(Rasterizer::Render(num_points, result));
// context_cleanup calls EGLOffscreenContext::Release here.
return tensorflow::Status();
return absl::Status();
}

tensorflow::Status RasterizerWithContext::Render(
int num_points, absl::Span<unsigned char> result) {
absl::Status RasterizerWithContext::Render(int num_points,
absl::Span<unsigned char> result) {
TF_RETURN_IF_ERROR(egl_context_->MakeCurrent());
auto context_cleanup =
MakeCleanup([this]() { return this->egl_context_->Release(); });
TF_RETURN_IF_ERROR(Rasterizer::Render(num_points, result));
// context_cleanup calls EGLOffscreenContext::Release here.
return tensorflow::Status();
return absl::Status();
}
Loading