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

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

Issue 962723002: Change CHROMIUM_image declarations to support multi planar input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changing the function calls Created 5 years, 10 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 59385241e5c89526420ceda1fd8c50d75fc050b1..cd2efcfa182dcc4e463a8c0cc9e24675e6c69355 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -4713,10 +4713,15 @@ bool ValidImageUsage(GLenum usage) {
} // namespace
-GLuint GLES2Implementation::CreateImageCHROMIUMHelper(ClientBuffer buffer,
+GLuint GLES2Implementation::CreateImageCHROMIUMHelper(ClientBuffer* buffers,
GLsizei width,
GLsizei height,
GLenum internalformat) {
+ if (buffers == nullptr) {
+ SetGLError(GL_INVALID_VALUE, "glCreateImageCHROMIUM", "invalid buffers");
mcasas 2015/02/28 01:14:26 nit: s/buffers/|buffers|/, although I don't see th
emircan 2015/02/28 02:33:36 Changed this and the ones below.
+ return 0;
+ }
+
if (width <= 0) {
SetGLError(GL_INVALID_VALUE, "glCreateImageCHROMIUM", "width <= 0");
return 0;
@@ -4728,12 +4733,12 @@ GLuint GLES2Implementation::CreateImageCHROMIUMHelper(ClientBuffer buffer,
}
if (!ValidImageFormat(internalformat)) {
- SetGLError(GL_INVALID_VALUE, "glCreateImageCHROMIUM", "invalid format");
+ SetGLError(GL_INVALID_ENUM, "glCreateImageCHROMIUM", "invalid format");
return 0;
}
int32_t image_id =
- gpu_control_->CreateImage(buffer, width, height, internalformat);
+ gpu_control_->CreateImage(buffers[0], width, height, internalformat);
mcasas 2015/02/28 01:14:26 Add a TODO() while you prepare and land the other,
emircan 2015/02/28 02:33:36 Added referencing the original bug reported.
if (image_id < 0) {
SetGLError(GL_OUT_OF_MEMORY, "glCreateImageCHROMIUM", "image_id < 0");
return 0;
@@ -4741,7 +4746,7 @@ GLuint GLES2Implementation::CreateImageCHROMIUMHelper(ClientBuffer buffer,
return image_id;
}
-GLuint GLES2Implementation::CreateImageCHROMIUM(ClientBuffer buffer,
+GLuint GLES2Implementation::CreateImageCHROMIUM(ClientBuffer* buffers,
GLsizei width,
GLsizei height,
GLenum internalformat) {
@@ -4751,7 +4756,7 @@ GLuint GLES2Implementation::CreateImageCHROMIUM(ClientBuffer buffer,
<< GLES2Util::GetStringImageInternalFormat(internalformat)
<< ")");
GLuint image_id =
- CreateImageCHROMIUMHelper(buffer, width, height, internalformat);
+ CreateImageCHROMIUMHelper(buffers, width, height, internalformat);
CheckGLError();
return image_id;
}

Powered by Google App Engine
This is Rietveld 408576698