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

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, 1 month 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 77049c59825abe6c706a63a4bbe3ae01af7ed6c3..c7ec58fe993def334b6045c06ca9f999fdda29af 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
@@ -2610,10 +2610,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