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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h

Issue 2379203002: implement getBufferSubDataAsync prototype (Closed)
Patch Set: small clarification Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h
index 23479a91c40c872683f81e18756676d6259718c6..4c76cc4325ae8739904ab642bceb6232544e3af2 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h
@@ -5,6 +5,7 @@
#ifndef WebGL2RenderingContextBase_h
#define WebGL2RenderingContextBase_h
+#include "bindings/core/v8/ScriptPromise.h"
#include "modules/webgl/WebGLExtension.h"
#include "modules/webgl/WebGLRenderingContextBase.h"
#include <memory>
@@ -15,6 +16,7 @@ class WebGLTexture;
class WebGLActiveInfo;
class WebGLBuffer;
+class WebGLGetBufferSubDataAsyncCallback;
class WebGLProgram;
class WebGLQuery;
class WebGLSampler;
@@ -27,6 +29,8 @@ class WebGL2RenderingContextBase : public WebGLRenderingContextBase {
public:
~WebGL2RenderingContextBase() override;
+ void destroyContext() override;
+
/* Buffer objects */
void bufferData(GLenum, DOMArrayBufferView*, GLenum, GLuint, GLuint);
void bufferSubData(GLenum, GLintptr, DOMArrayBufferView*, GLuint, GLuint);
@@ -43,6 +47,17 @@ class WebGL2RenderingContextBase : public WebGLRenderingContextBase {
void copyBufferSubData(GLenum, GLenum, long long, long long, long long);
void getBufferSubData(GLenum, long long, DOMArrayBufferView*, GLuint, GLuint);
+ ScriptPromise getBufferSubDataAsync(ScriptState*,
+ GLenum target,
+ GLintptr srcByteOffset,
+ DOMArrayBufferView*,
+ GLuint dstOffset,
+ GLuint length);
+
+ void registerGetBufferSubDataAsyncCallback(
+ WebGLGetBufferSubDataAsyncCallback*);
+ void unregisterGetBufferSubDataAsyncCallback(
+ WebGLGetBufferSubDataAsyncCallback*);
/* Framebuffer objects */
bool validateTexFuncLayer(const char*, GLenum texTarget, GLint layer);
@@ -811,6 +826,20 @@ class WebGL2RenderingContextBase : public WebGLRenderingContextBase {
GLenum target) override;
bool validateBufferDataUsage(const char* functionName, GLenum usage) override;
+ const char* validateGetBufferSubData(const char* functionName,
+ GLenum target,
+ GLintptr sourceByteOffset,
+ DOMArrayBufferView*,
+ GLuint destinationOffset,
+ GLuint length,
+ WebGLBuffer**,
+ void** outDestinationDataPtr,
+ long long* outDestinationByteLength);
+ const char* validateGetBufferSubDataBounds(const char* functionName,
+ WebGLBuffer*,
+ GLintptr sourceByteOffset,
+ long long destinationByteLength);
+
bool canUseTexImageByGPU(TexImageFunctionID,
GLint internalformat,
GLenum type) override;
@@ -860,6 +889,9 @@ class WebGL2RenderingContextBase : public WebGLRenderingContextBase {
GLint m_unpackSkipPixels;
GLint m_unpackSkipRows;
GLint m_unpackSkipImages;
+
+ HeapHashSet<Member<WebGLGetBufferSubDataAsyncCallback>>
+ m_getBufferSubDataAsyncCallbacks;
};
DEFINE_TYPE_CASTS(WebGL2RenderingContextBase,
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/DEPS ('k') | third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698