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

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

Issue 2360353002: Remove obsolete getBufferSubData compatibility entry points. (Closed)
Patch Set: Preemptive rebase. Created 4 years, 3 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.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index d7baad33761080ec6cfde21b119e18ba02e1bb72..1d7971b5f50e32835300d3174d098840c7d647a8 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -330,34 +330,6 @@ void WebGL2RenderingContextBase::getBufferSubData(GLenum target, long long srcBy
contextGL()->UnmapBuffer(target);
}
-void WebGL2RenderingContextBase::getBufferSubData(GLenum target, long long srcByteOffset, DOMArrayBuffer* dstData)
-{
- const char* funcName = "getBufferSubData";
- if (isContextLost())
- return;
-
- if (!dstData) {
- synthesizeGLError(GL_INVALID_VALUE, funcName, "ArrayBuffer can not be null");
- return;
- }
- if (!validateValueFitNonNegInt32(funcName, "srcByteOffset", srcByteOffset)) {
- return;
- }
- WebGLBuffer* buffer = validateBufferDataTarget(funcName, target);
- if (!buffer)
- return;
- if (srcByteOffset + dstData->byteLength() > buffer->getSize()) {
- synthesizeGLError(GL_INVALID_VALUE, funcName, "buffer overflow");
- return;
- }
-
- void* mappedData = contextGL()->MapBufferRange(target, static_cast<GLintptr>(srcByteOffset), dstData->byteLength(), GL_MAP_READ_BIT);
- if (!mappedData)
- return;
- memcpy(dstData->data(), mappedData, dstData->byteLength());
- contextGL()->UnmapBuffer(target);
-}
-
void WebGL2RenderingContextBase::blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
{
if (isContextLost())

Powered by Google App Engine
This is Rietveld 408576698