| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 6063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6074 case GL_SAMPLE_COVERAGE: | 6074 case GL_SAMPLE_COVERAGE: |
| 6075 case GL_SCISSOR_TEST: | 6075 case GL_SCISSOR_TEST: |
| 6076 case GL_STENCIL_TEST: | 6076 case GL_STENCIL_TEST: |
| 6077 return true; | 6077 return true; |
| 6078 default: | 6078 default: |
| 6079 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid capability"); | 6079 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid capability"); |
| 6080 return false; | 6080 return false; |
| 6081 } | 6081 } |
| 6082 } | 6082 } |
| 6083 | 6083 |
| 6084 template<typename WTFTypedArray> | |
| 6085 bool WebGLRenderingContextBase::validateUniformParameters(const char* functionNa
me, const WebGLUniformLocation* location, const TypedFlexibleArrayBufferView<WTF
TypedArray>& v, GLsizei requiredMinSize) | |
| 6086 { | |
| 6087 if (!v.dataMaybeOnStack()) { | |
| 6088 synthesizeGLError(GL_INVALID_VALUE, functionName, "no array"); | |
| 6089 return false; | |
| 6090 } | |
| 6091 return validateUniformMatrixParameters(functionName, location, false, v.data
MaybeOnStack(), v.length(), requiredMinSize); | |
| 6092 } | |
| 6093 | |
| 6094 bool WebGLRenderingContextBase::validateUniformParameters(const char* functionNa
me, const WebGLUniformLocation* location, DOMFloat32Array* v, GLsizei requiredMi
nSize) | 6084 bool WebGLRenderingContextBase::validateUniformParameters(const char* functionNa
me, const WebGLUniformLocation* location, DOMFloat32Array* v, GLsizei requiredMi
nSize) |
| 6095 { | 6085 { |
| 6096 if (!v) { | 6086 if (!v) { |
| 6097 synthesizeGLError(GL_INVALID_VALUE, functionName, "no array"); | 6087 synthesizeGLError(GL_INVALID_VALUE, functionName, "no array"); |
| 6098 return false; | 6088 return false; |
| 6099 } | 6089 } |
| 6100 return validateUniformMatrixParameters(functionName, location, false, v->dat
a(), v->length(), requiredMinSize); | 6090 return validateUniformMatrixParameters(functionName, location, false, v->dat
a(), v->length(), requiredMinSize); |
| 6101 } | 6091 } |
| 6102 | 6092 |
| 6103 bool WebGLRenderingContextBase::validateUniformParameters(const char* functionNa
me, const WebGLUniformLocation* location, DOMInt32Array* v, GLsizei requiredMinS
ize) | 6093 bool WebGLRenderingContextBase::validateUniformParameters(const char* functionNa
me, const WebGLUniformLocation* location, DOMInt32Array* v, GLsizei requiredMinS
ize) |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6734 | 6724 |
| 6735 return totalBytesPerPixel; | 6725 return totalBytesPerPixel; |
| 6736 } | 6726 } |
| 6737 | 6727 |
| 6738 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 6728 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
| 6739 { | 6729 { |
| 6740 return m_drawingBuffer.get(); | 6730 return m_drawingBuffer.get(); |
| 6741 } | 6731 } |
| 6742 | 6732 |
| 6743 } // namespace blink | 6733 } // namespace blink |
| OLD | NEW |