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

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

Issue 2025703002: Pack repeated code in tex(Sub)Image2D and texSubImage3D into helper func (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make validateTexture3DBinding pure virtual in WebGLBase Created 4 years, 6 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 259
260 bool validateReadPixelsFormatAndType(GLenum format, GLenum type, DOMArrayBuf ferView*) override; 260 bool validateReadPixelsFormatAndType(GLenum format, GLenum type, DOMArrayBuf ferView*) override;
261 WebGLFramebuffer* getFramebufferBinding(GLenum target) override; 261 WebGLFramebuffer* getFramebufferBinding(GLenum target) override;
262 WebGLFramebuffer* getReadFramebufferBinding() override; 262 WebGLFramebuffer* getReadFramebufferBinding() override;
263 GLint getMaxTextureLevelForTarget(GLenum target) override; 263 GLint getMaxTextureLevelForTarget(GLenum target) override;
264 void renderbufferStorageImpl(GLenum target, GLsizei samples, GLenum internal format, GLsizei width, GLsizei height, const char* functionName) override; 264 void renderbufferStorageImpl(GLenum target, GLsizei samples, GLenum internal format, GLsizei width, GLsizei height, const char* functionName) override;
265 265
266 // Helper function to check texture 3D target and texture bound to the targe t. 266 // Helper function to check texture 3D target and texture bound to the targe t.
267 // Generate GL errors and return 0 if target is invalid or texture bound is 267 // Generate GL errors and return 0 if target is invalid or texture bound is
268 // null. Otherwise, return the texture bound to the target. 268 // null. Otherwise, return the texture bound to the target.
269 WebGLTexture* validateTexture3DBinding(const char* functionName, GLenum targ et); 269 WebGLTexture* validateTexture3DBinding(const char* functionName, GLenum targ et) override;
270 270
271 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe t) override; 271 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe t) override;
272 bool validateBufferDataUsage(const char* functionName, GLenum usage) overrid e; 272 bool validateBufferDataUsage(const char* functionName, GLenum usage) overrid e;
273 273
274 void removeBoundBuffer(WebGLBuffer*) override; 274 void removeBoundBuffer(WebGLBuffer*) override;
275 275
276 void resetUnpackParameters() override; 276 void resetUnpackParameters() override;
277 void restoreUnpackParameters() override; 277 void restoreUnpackParameters() override;
278 278
279 bool transformFeedbackActive() const override; 279 bool transformFeedbackActive() const override;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 ScopedPersistent<v8::Array> m_queryWrappers; 316 ScopedPersistent<v8::Array> m_queryWrappers;
317 }; 317 };
318 318
319 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, 319 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context,
320 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, 320 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2,
321 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ; 321 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ;
322 322
323 } // namespace blink 323 } // namespace blink
324 324
325 #endif 325 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698