Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
[gecko.git] / dom / canvas / WebGL1ContextUniforms.cpp
blob41af49437c3c00dba3d17479393cd92e4726a257
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "WebGL1Context.h"
8 using namespace mozilla;
10 bool
11 WebGL1Context::ValidateAttribPointerType(bool /*integerMode*/, GLenum type, GLsizei* out_alignment, const char* info)
13 MOZ_ASSERT(out_alignment);
14 if (!out_alignment)
15 return false;
17 switch (type) {
18 case LOCAL_GL_BYTE:
19 case LOCAL_GL_UNSIGNED_BYTE:
20 *out_alignment = 1;
21 return true;
23 case LOCAL_GL_SHORT:
24 case LOCAL_GL_UNSIGNED_SHORT:
25 *out_alignment = 2;
26 return true;
27 // XXX case LOCAL_GL_FIXED:
28 case LOCAL_GL_FLOAT:
29 *out_alignment = 4;
30 return true;
33 ErrorInvalidEnumInfo(info, type);
34 return false;