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

Unified Diff: gpu/blink/webgraphicscontext3d_impl.cc

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 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/blink/webgraphicscontext3d_impl.cc
diff --git a/gpu/blink/webgraphicscontext3d_impl.cc b/gpu/blink/webgraphicscontext3d_impl.cc
index 581e10298ec45f87436452ae2fd3410e465e8eab..e469532efd65354298f960922cacada1a4d9fae1 100644
--- a/gpu/blink/webgraphicscontext3d_impl.cc
+++ b/gpu/blink/webgraphicscontext3d_impl.cc
@@ -19,6 +19,21 @@
#endif
#include "third_party/khronos/GLES2/gl2ext.h"
+using blink::WGC3Dbitfield;
+using blink::WGC3Dboolean;
+using blink::WGC3Dbyte;
+using blink::WGC3Dchar;
+using blink::WGC3Dclampf;
+using blink::WGC3Denum;
+using blink::WGC3Dfloat;
+using blink::WGC3Dint;
+using blink::WGC3Dintptr;
+using blink::WGC3Dsizei;
+using blink::WGC3Dsizeiptr;
+using blink::WGC3Duint64;
+using blink::WGC3Duint;
+using blink::WebGLId;
+
namespace gpu_blink {
namespace {
@@ -361,11 +376,12 @@ bool WebGraphicsContext3DImpl::getActiveAttrib(
program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &max_name_length);
if (max_name_length < 0)
return false;
- scoped_ptr<GLchar[]> name(new GLchar[max_name_length]);
- if (!name) {
- synthesizeGLError(GL_OUT_OF_MEMORY);
+ if (max_name_length == 0) {
+ // No active attributes exist.
+ synthesizeGLError(GL_INVALID_VALUE);
return false;
}
+ scoped_ptr<GLchar[]> name(new GLchar[max_name_length]);
GLsizei length = 0;
GLint size = -1;
GLenum type = 0;
@@ -387,11 +403,12 @@ bool WebGraphicsContext3DImpl::getActiveUniform(
program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &max_name_length);
if (max_name_length < 0)
return false;
- scoped_ptr<GLchar[]> name(new GLchar[max_name_length]);
- if (!name) {
- synthesizeGLError(GL_OUT_OF_MEMORY);
+ if (max_name_length == 0) {
+ // No active uniforms exist.
+ synthesizeGLError(GL_INVALID_VALUE);
return false;
}
+ scoped_ptr<GLchar[]> name(new GLchar[max_name_length]);
GLsizei length = 0;
GLint size = -1;
GLenum type = 0;
« no previous file with comments | « gpu/blink/webgraphicscontext3d_impl.h ('k') | gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698