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

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

Issue 2266563002: Implement buffer{Sub}Data overloads with sub source. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 4 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 | « no previous file | third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <memory> 10 #include <memory>
(...skipping 10 matching lines...) Expand all
21 class WebGLSync; 21 class WebGLSync;
22 class WebGLTransformFeedback; 22 class WebGLTransformFeedback;
23 class WebGLUniformLocation; 23 class WebGLUniformLocation;
24 class WebGLVertexArrayObject; 24 class WebGLVertexArrayObject;
25 25
26 class WebGL2RenderingContextBase : public WebGLRenderingContextBase { 26 class WebGL2RenderingContextBase : public WebGLRenderingContextBase {
27 public: 27 public:
28 ~WebGL2RenderingContextBase() override; 28 ~WebGL2RenderingContextBase() override;
29 29
30 /* Buffer objects */ 30 /* Buffer objects */
31 void bufferData(GLenum, DOMArrayBufferView*, GLenum, GLuint, GLuint);
32 void bufferSubData(GLenum, GLintptr, DOMArrayBufferView*, GLuint, GLuint);
33 // Have to re-declare/re-define the following buffer{Sub}Data functions from base class.
34 // This is because the above buffer{Sub}Data() hides the name from base clas s.
35 void bufferData(GLenum target, long long size, GLenum usage);
36 void bufferData(GLenum target, DOMArrayBuffer* data, GLenum usage);
37 void bufferData(GLenum target, DOMArrayBufferView* data, GLenum usage);
38 void bufferSubData(GLenum target, long long offset, DOMArrayBuffer* data);
39 void bufferSubData(GLenum target, long long offset, const FlexibleArrayBuffe rView& data);
40
31 void copyBufferSubData(GLenum, GLenum, long long, long long, long long); 41 void copyBufferSubData(GLenum, GLenum, long long, long long, long long);
32 void getBufferSubData(GLenum target, long long offset, DOMArrayBuffer* retur nedData); 42 void getBufferSubData(GLenum, long long, DOMArrayBufferView*, GLuint, GLuint );
43 // TODO(zmo): Obsolete, remove after WebGL2 conformance tests are updated.
44 void getBufferSubData(GLenum, long long, DOMArrayBuffer*);
33 45
34 /* Framebuffer objects */ 46 /* Framebuffer objects */
35 bool validateTexFuncLayer(const char*, GLenum texTarget, GLint layer); 47 bool validateTexFuncLayer(const char*, GLenum texTarget, GLint layer);
36 void blitFramebuffer(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); 48 void blitFramebuffer(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
37 void framebufferTextureLayer(ScriptState*, GLenum, GLenum, WebGLTexture*, GL int, GLint); 49 void framebufferTextureLayer(ScriptState*, GLenum, GLenum, WebGLTexture*, GL int, GLint);
38 ScriptValue getInternalformatParameter(ScriptState*, GLenum, GLenum, GLenum) ; 50 ScriptValue getInternalformatParameter(ScriptState*, GLenum, GLenum, GLenum) ;
39 void invalidateFramebuffer(GLenum, const Vector<GLenum>&); 51 void invalidateFramebuffer(GLenum, const Vector<GLenum>&);
40 void invalidateSubFramebuffer(GLenum, const Vector<GLenum>&, GLint, GLint, G Lsizei, GLsizei); 52 void invalidateSubFramebuffer(GLenum, const Vector<GLenum>&, GLint, GLint, G Lsizei, GLsizei);
41 void readBuffer(GLenum); 53 void readBuffer(GLenum);
42 54
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 ScopedPersistent<v8::Array> m_queryWrappers; 328 ScopedPersistent<v8::Array> m_queryWrappers;
317 }; 329 };
318 330
319 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, 331 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context,
320 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, 332 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2,
321 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ; 333 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ;
322 334
323 } // namespace blink 335 } // namespace blink
324 336
325 #endif 337 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698