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

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 1974163003: Expose GpuMemoryBufferId through glGetImageivCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 years, 7 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/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index c7b96402a46e748d911b3d8d89ad0ea6ef1a8f48..162ee43a3e430401cde201ca3707eef2d66a2ee4 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -6072,6 +6072,21 @@ GLuint GLES2Implementation::CreateGpuMemoryBufferImageCHROMIUM(
return image_id;
}
+void GLES2Implementation::GetImageivCHROMIUM(GLuint image_id,
+ GLenum param,
+ GLint* data) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] GetImageivCHROMIUM(" << image_id
+ << ", " << GLES2Util::GetStringImageInternalFormat(param)
+ << ")");
+ if (param != GL_GPU_MEMORY_BUFFER_ID) {
+ SetGLError(GL_INVALID_VALUE, "GetImageivCHROMIUM", "param");
+ *data = -1;
+ return;
+ }
+ *data = gpu_control_->GetImageGpuMemoryBufferId(image_id);
+}
+
bool GLES2Implementation::ValidateSize(const char* func, GLsizeiptr size) {
if (size < 0) {
SetGLError(GL_INVALID_VALUE, func, "size < 0");
« no previous file with comments | « gpu/command_buffer/client/gles2_c_lib_autogen.h ('k') | gpu/command_buffer/client/gles2_implementation_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698