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

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

Issue 1543233002: Unify validation for TexImage{2D|3D} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
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 #ifndef WebGL2RenderingContextBase_h 5 #ifndef WebGL2RenderingContextBase_h
6 #define WebGL2RenderingContextBase_h 6 #define WebGL2RenderingContextBase_h
7 7
8 #include "modules/webgl/WebGLExtension.h" 8 #include "modules/webgl/WebGLExtension.h"
9 #include "modules/webgl/WebGLRenderingContextBase.h" 9 #include "modules/webgl/WebGLRenderingContextBase.h"
10 10
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // Generate GL error and return false if parameters are illegal. 189 // Generate GL error and return false if parameters are illegal.
190 bool validateGetFramebufferAttachmentParameterFunc(const char* functionName, GLenum target, GLenum attachment); 190 bool validateGetFramebufferAttachmentParameterFunc(const char* functionName, GLenum target, GLenum attachment);
191 191
192 bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei le ngth); 192 bool validateClearBuffer(const char* functionName, GLenum buffer, GLsizei le ngth);
193 193
194 enum TexStorageType { 194 enum TexStorageType {
195 TexStorageType2D, 195 TexStorageType2D,
196 TexStorageType3D, 196 TexStorageType3D,
197 }; 197 };
198 bool validateTexStorage(const char*, GLenum, GLsizei, GLenum, GLsizei, GLsiz ei, GLsizei, TexStorageType); 198 bool validateTexStorage(const char*, GLenum, GLsizei, GLenum, GLsizei, GLsiz ei, GLsizei, TexStorageType);
199 bool validateTexImage3D(const char* functionName, GLenum target, GLint level , GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint bor der, GLenum format, GLenum type);
200 bool validateTexSubImage3D(const char*, GLenum target, GLint level, GLint xo ffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, GLsizei width, GLsizei height, GLsizei depth); 199 bool validateTexSubImage3D(const char*, GLenum target, GLint level, GLint xo ffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, GLsizei width, GLsizei height, GLsizei depth);
201 200
202 ScriptValue getInt64Parameter(ScriptState*, GLenum); 201 ScriptValue getInt64Parameter(ScriptState*, GLenum);
203 202
204 void texSubImage3DImpl(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, I mage*, WebGLImageConversion::ImageHtmlDomSource, bool, bool); 203 void texSubImage3DImpl(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, I mage*, WebGLImageConversion::ImageHtmlDomSource, bool, bool);
205 void samplerParameter(WebGLSampler*, GLenum, GLfloat, GLint, bool); 204 void samplerParameter(WebGLSampler*, GLenum, GLfloat, GLint, bool);
206 205
207 bool isBufferBoundToTransformFeedback(WebGLBuffer*); 206 bool isBufferBoundToTransformFeedback(WebGLBuffer*);
208 bool isBufferBoundToNonTransformFeedback(WebGLBuffer*); 207 bool isBufferBoundToNonTransformFeedback(WebGLBuffer*);
209 bool validateBufferTargetCompatibility(const char*, GLenum, WebGLBuffer*); 208 bool validateBufferTargetCompatibility(const char*, GLenum, WebGLBuffer*);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 GLint m_unpackSkipImages; 274 GLint m_unpackSkipImages;
276 }; 275 };
277 276
278 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, 277 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context,
279 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, 278 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2,
280 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ; 279 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ;
281 280
282 } // namespace blink 281 } // namespace blink
283 282
284 #endif 283 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698