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

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

Issue 1579253003: WebGL 2: remove incorrect enum value for buffer in clearBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 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 "modules/webgl/WebGL2RenderingContextBase.h" 5 #include "modules/webgl/WebGL2RenderingContextBase.h"
6 6
7 #include "bindings/modules/v8/WebGLAny.h" 7 #include "bindings/modules/v8/WebGLAny.h"
8 #include "core/html/HTMLCanvasElement.h" 8 #include "core/html/HTMLCanvasElement.h"
9 #include "core/html/HTMLImageElement.h" 9 #include "core/html/HTMLImageElement.h"
10 #include "core/html/HTMLVideoElement.h" 10 #include "core/html/HTMLVideoElement.h"
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 } 1598 }
1599 } 1599 }
1600 m_framebufferBinding->drawBuffers(buffers); 1600 m_framebufferBinding->drawBuffers(buffers);
1601 } 1601 }
1602 } 1602 }
1603 1603
1604 bool WebGL2RenderingContextBase::validateClearBuffer(const char* functionName, G Lenum buffer, GLsizei size) 1604 bool WebGL2RenderingContextBase::validateClearBuffer(const char* functionName, G Lenum buffer, GLsizei size)
1605 { 1605 {
1606 switch (buffer) { 1606 switch (buffer) {
1607 case GL_COLOR: 1607 case GL_COLOR:
1608 case GL_FRONT:
1609 case GL_BACK:
1610 case GL_FRONT_AND_BACK:
qiankun 2016/01/13 06:11:35 INVALID_EUNUM should be genereated for the invalid
yunchao 2016/01/13 07:52:18 It is not possible to expose the error by adding w
1611 if (size < 4) { 1608 if (size < 4) {
1612 synthesizeGLError(GL_INVALID_VALUE, functionName, "invalid array siz e"); 1609 synthesizeGLError(GL_INVALID_VALUE, functionName, "invalid array siz e");
1613 return false; 1610 return false;
1614 } 1611 }
1615 break; 1612 break;
1616 case GL_DEPTH: 1613 case GL_DEPTH:
1617 case GL_STENCIL: 1614 case GL_STENCIL:
1618 if (size < 1) { 1615 if (size < 1) {
1619 synthesizeGLError(GL_INVALID_VALUE, functionName, "invalid array siz e"); 1616 synthesizeGLError(GL_INVALID_VALUE, functionName, "invalid array siz e");
1620 return false; 1617 return false;
(...skipping 1928 matching lines...) Expand 10 before | Expand all | Expand 10 after
3549 3546
3550 WebGLSampler* sampler = m_samplerUnits[unit]; 3547 WebGLSampler* sampler = m_samplerUnits[unit];
3551 3548
3552 if (sampler) 3549 if (sampler)
3553 return sampler->getSamplerState(); 3550 return sampler->getSamplerState();
3554 3551
3555 return WebGLRenderingContextBase::getTextureUnitSamplerState(target, unit); 3552 return WebGLRenderingContextBase::getTextureUnitSamplerState(target, unit);
3556 } 3553 }
3557 3554
3558 } // namespace blink 3555 } // 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