Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |