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

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

Issue 1379863003: Added overloads of uniform[1234]uiv taking Uint32Array to match spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typo causing crashes in uniform API tests. Created 5 years, 2 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 | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h ('k') | 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 /* 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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698