Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc

Issue 2388653002: gpu: Add CHROMIUM_texture_from_image spec and fence support.
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
index 7f595d05d1d52bc6fe9e461a40f917005fd4aec7..eb451a2b66381de28f25f77cbf8908884efa7356 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
@@ -2652,10 +2652,14 @@ error::Error GLES2DecoderPassthroughImpl::DoBindUniformLocationCHROMIUM(
error::Error GLES2DecoderPassthroughImpl::DoBindTexImage2DCHROMIUM(
GLenum target,
- GLint imageId) {
+ GLint imageId,
+ GLint fenceId) {
// TODO(geofflang): error handling
gl::GLImage* image = image_manager_->LookupImage(imageId);
- if (!image->BindTexImage(target)) {
+ gl::GLFence* fence = nullptr;
+ if (fenceId)
+ fence = fence_manager_->LookupFence(fenceId);
+ if (!image->BindTexImage(target, fence)) {
image->CopyTexImage(target);
}
return error::kNoError;

Powered by Google App Engine
This is Rietveld 408576698