Revert of Add support for glMapBufferRange. Use glMapBufferRange and glMapBufferSubData. (https://codereview.chromium.org/243413002/)
Reason for revert:
This is firing an assert on many of the Android debug bots
Original issue's description:
> Add support for glMapBufferRange. Use glMapBufferRange and glMapBufferSubData.
>
> BUG=skia:2402
>
> Committed: http://code.google.com/p/skia/source/detail?r=14533
git-svn-id: http://skia.googlecode.com/svn/trunk@14541 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLCreateNullInterface.cpp b/src/gpu/gl/GrGLCreateNullInterface.cpp
index 6cfa8c2..2ef7659 100644
--- a/src/gpu/gl/GrGLCreateNullInterface.cpp
+++ b/src/gpu/gl/GrGLCreateNullInterface.cpp
@@ -186,29 +186,8 @@
}
}
-GrGLvoid* GR_GL_FUNCTION_TYPE nullGLMapBufferRange(GrGLenum target, GrGLintptr offset,
- GrGLsizeiptr length, GrGLbitfield access) {
- GrGLuint id = 0;
- switch (target) {
- case GR_GL_ARRAY_BUFFER:
- id = gCurrArrayBuffer;
- break;
- case GR_GL_ELEMENT_ARRAY_BUFFER:
- id = gCurrElementArrayBuffer;
- break;
- }
-
- if (id > 0) {
- // We just ignore the offset and length here.
- GrBufferObj* buffer = look_up(id);
- SkASSERT(!buffer->mapped());
- buffer->setMapped(true);
- return buffer->dataPtr();
- }
- return NULL;
-}
-
GrGLvoid* GR_GL_FUNCTION_TYPE nullGLMapBuffer(GrGLenum target, GrGLenum access) {
+
GrGLuint id = 0;
switch (target) {
case GR_GL_ARRAY_BUFFER:
@@ -230,11 +209,6 @@
return NULL; // no buffer bound to target
}
-GrGLvoid GR_GL_FUNCTION_TYPE nullGLFlushMappedBufferRange(GrGLenum target,
- GrGLintptr offset,
- GrGLsizeiptr length) {}
-
-
GrGLboolean GR_GL_FUNCTION_TYPE nullGLUnmapBuffer(GrGLenum target) {
GrGLuint id = 0;
switch (target) {
@@ -330,7 +304,6 @@
functions->fEndQuery = noOpGLEndQuery;
functions->fFinish = noOpGLFinish;
functions->fFlush = noOpGLFlush;
- functions->fFlushMappedBufferRange = nullGLFlushMappedBufferRange;
functions->fFrontFace = noOpGLFrontFace;
functions->fGenBuffers = nullGLGenBuffers;
functions->fGenerateMipmap = nullGLGenerateMipmap;
@@ -356,8 +329,6 @@
functions->fInsertEventMarker = noOpGLInsertEventMarker;
functions->fLineWidth = noOpGLLineWidth;
functions->fLinkProgram = noOpGLLinkProgram;
- functions->fMapBuffer = nullGLMapBuffer;
- functions->fMapBufferRange = nullGLMapBufferRange;
functions->fPixelStorei = nullGLPixelStorei;
functions->fPopGroupMarker = noOpGLPopGroupMarker;
functions->fPushGroupMarker = noOpGLPushGroupMarker;
@@ -397,7 +368,6 @@
functions->fUniformMatrix2fv = noOpGLUniformMatrix2fv;
functions->fUniformMatrix3fv = noOpGLUniformMatrix3fv;
functions->fUniformMatrix4fv = noOpGLUniformMatrix4fv;
- functions->fUnmapBuffer = nullGLUnmapBuffer;
functions->fUseProgram = nullGLUseProgram;
functions->fVertexAttrib4fv = noOpGLVertexAttrib4fv;
functions->fVertexAttribPointer = noOpGLVertexAttribPointer;
@@ -417,8 +387,10 @@
functions->fRenderbufferStorageMultisample = noOpGLRenderbufferStorageMultisample;
functions->fBlitFramebuffer = noOpGLBlitFramebuffer;
functions->fResolveMultisampleFramebuffer = noOpGLResolveMultisampleFramebuffer;
+ functions->fMapBuffer = nullGLMapBuffer;
functions->fMatrixLoadf = noOpGLMatrixLoadf;
functions->fMatrixLoadIdentity = noOpGLMatrixLoadIdentity;
+ functions->fUnmapBuffer = nullGLUnmapBuffer;
functions->fBindFragDataLocationIndexed = noOpGLBindFragDataLocationIndexed;
interface->fExtensions.init(kGL_GrGLStandard, functions->fGetString, functions->fGetStringi,