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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp

Issue 1518803004: Add unsized color-renderable formats to getInternalformatParameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "modules/webgl/WebGL2RenderingContextBase.h" 6 #include "modules/webgl/WebGL2RenderingContextBase.h"
7 7
8 #include "bindings/modules/v8/WebGLAny.h" 8 #include "bindings/modules/v8/WebGLAny.h"
9 #include "core/html/HTMLCanvasElement.h" 9 #include "core/html/HTMLCanvasElement.h"
10 #include "core/html/HTMLImageElement.h" 10 #include "core/html/HTMLImageElement.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 return ScriptValue::createNull(scriptState); 320 return ScriptValue::createNull(scriptState);
321 321
322 if (target != GL_RENDERBUFFER) { 322 if (target != GL_RENDERBUFFER) {
323 synthesizeGLError(GL_INVALID_ENUM, "getInternalformatParameter", "invali d target"); 323 synthesizeGLError(GL_INVALID_ENUM, "getInternalformatParameter", "invali d target");
324 return ScriptValue::createNull(scriptState); 324 return ScriptValue::createNull(scriptState);
325 } 325 }
326 326
327 bool floatType = false; 327 bool floatType = false;
328 328
329 switch (internalformat) { 329 switch (internalformat) {
330 // Renderbuffer doesn't support unsized internal formats,
331 // though GL_RGB and GL_RGBA are color-renderable.
332 case GL_RGB:
333 case GL_RGBA:
334 // Multisampling is not supported for signed and unsigned integer internal f ormats.
330 case GL_R8UI: 335 case GL_R8UI:
331 case GL_R8I: 336 case GL_R8I:
332 case GL_R16UI: 337 case GL_R16UI:
333 case GL_R16I: 338 case GL_R16I:
334 case GL_R32UI: 339 case GL_R32UI:
335 case GL_R32I: 340 case GL_R32I:
336 case GL_RG8UI: 341 case GL_RG8UI:
337 case GL_RG8I: 342 case GL_RG8I:
338 case GL_RG16UI: 343 case GL_RG16UI:
339 case GL_RG16I: 344 case GL_RG16I:
(...skipping 3017 matching lines...) Expand 10 before | Expand all | Expand 10 after
3357 3362
3358 WebGLSampler* sampler = m_samplerUnits[unit]; 3363 WebGLSampler* sampler = m_samplerUnits[unit];
3359 3364
3360 if (sampler) 3365 if (sampler)
3361 return sampler->getSamplerState(); 3366 return sampler->getSamplerState();
3362 3367
3363 return WebGLRenderingContextBase::getTextureUnitSamplerState(target, unit); 3368 return WebGLRenderingContextBase::getTextureUnitSamplerState(target, unit);
3364 } 3369 }
3365 3370
3366 } // namespace blink 3371 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698