Index: src/gpu/gl/SkNullGLContext.cpp |
diff --git a/src/gpu/gl/SkNullGLContext.cpp b/src/gpu/gl/SkNullGLContext.cpp |
index e2a80ce2b37e72ca6f2c68c85f9a00090c6477b0..e7270c32c47c6283f5d45e4f2be40bb520a0abda 100644 |
--- a/src/gpu/gl/SkNullGLContext.cpp |
+++ b/src/gpu/gl/SkNullGLContext.cpp |
@@ -122,6 +122,8 @@ public: |
BufferManager fBufferManager; |
GrGLuint fCurrArrayBuffer; |
GrGLuint fCurrElementArrayBuffer; |
+ GrGLuint fCurrPixelPackBuffer; |
+ GrGLuint fCurrPixelUnpackBuffer; |
GrGLuint fCurrProgramID; |
GrGLuint fCurrShaderID; |
@@ -129,6 +131,8 @@ public: |
ContextState() |
: fCurrArrayBuffer(0) |
, fCurrElementArrayBuffer(0) |
+ , fCurrPixelPackBuffer(0) |
+ , fCurrPixelUnpackBuffer(0) |
, fCurrProgramID(0) |
, fCurrShaderID(0) {} |
@@ -172,6 +176,12 @@ GrGLvoid GR_GL_FUNCTION_TYPE nullGLBufferData(GrGLenum target, |
case GR_GL_ELEMENT_ARRAY_BUFFER: |
id = state->fCurrElementArrayBuffer; |
break; |
+ case GR_GL_PIXEL_PACK_BUFFER: |
+ id = state->fCurrPixelPackBuffer; |
+ break; |
+ case GR_GL_PIXEL_UNPACK_BUFFER: |
+ id = state->fCurrPixelUnpackBuffer; |
+ break; |
default: |
SkFAIL("Unexpected target to nullGLBufferData"); |
break; |
@@ -215,6 +225,12 @@ GrGLvoid GR_GL_FUNCTION_TYPE nullGLBindBuffer(GrGLenum target, GrGLuint buffer) |
case GR_GL_ELEMENT_ARRAY_BUFFER: |
state->fCurrElementArrayBuffer = buffer; |
break; |
+ case GR_GL_PIXEL_PACK_BUFFER: |
+ state->fCurrPixelPackBuffer = buffer; |
+ break; |
+ case GR_GL_PIXEL_UNPACK_BUFFER: |
+ state->fCurrPixelUnpackBuffer = buffer; |
+ break; |
} |
} |
@@ -228,6 +244,12 @@ GrGLvoid GR_GL_FUNCTION_TYPE nullGLDeleteBuffers(GrGLsizei n, const GrGLuint* id |
if (ids[i] == state->fCurrElementArrayBuffer) { |
state->fCurrElementArrayBuffer = 0; |
} |
+ if (ids[i] == state->fCurrPixelPackBuffer) { |
+ state->fCurrPixelPackBuffer = 0; |
+ } |
+ if (ids[i] == state->fCurrPixelUnpackBuffer) { |
+ state->fCurrPixelUnpackBuffer = 0; |
+ } |
BufferObj* buffer = state->fBufferManager.lookUp(ids[i]); |
state->fBufferManager.free(buffer); |
@@ -245,6 +267,12 @@ GrGLvoid* GR_GL_FUNCTION_TYPE nullGLMapBufferRange(GrGLenum target, GrGLintptr o |
case GR_GL_ELEMENT_ARRAY_BUFFER: |
id = state->fCurrElementArrayBuffer; |
break; |
+ case GR_GL_PIXEL_PACK_BUFFER: |
+ id = state->fCurrPixelPackBuffer; |
+ break; |
+ case GR_GL_PIXEL_UNPACK_BUFFER: |
+ id = state->fCurrPixelUnpackBuffer; |
+ break; |
} |
if (id > 0) { |
@@ -267,6 +295,12 @@ GrGLvoid* GR_GL_FUNCTION_TYPE nullGLMapBuffer(GrGLenum target, GrGLenum access) |
case GR_GL_ELEMENT_ARRAY_BUFFER: |
id = state->fCurrElementArrayBuffer; |
break; |
+ case GR_GL_PIXEL_PACK_BUFFER: |
+ id = state->fCurrPixelPackBuffer; |
+ break; |
+ case GR_GL_PIXEL_UNPACK_BUFFER: |
+ id = state->fCurrPixelUnpackBuffer; |
+ break; |
} |
if (id > 0) { |
@@ -295,6 +329,12 @@ GrGLboolean GR_GL_FUNCTION_TYPE nullGLUnmapBuffer(GrGLenum target) { |
case GR_GL_ELEMENT_ARRAY_BUFFER: |
id = state->fCurrElementArrayBuffer; |
break; |
+ case GR_GL_PIXEL_PACK_BUFFER: |
+ id = state->fCurrPixelPackBuffer; |
+ break; |
+ case GR_GL_PIXEL_UNPACK_BUFFER: |
+ id = state->fCurrPixelUnpackBuffer; |
+ break; |
} |
if (id > 0) { |
BufferObj* buffer = state->fBufferManager.lookUp(id); |
@@ -320,6 +360,12 @@ GrGLvoid GR_GL_FUNCTION_TYPE nullGLGetBufferParameteriv(GrGLenum target, GrGLenu |
case GR_GL_ELEMENT_ARRAY_BUFFER: |
id = state->fCurrElementArrayBuffer; |
break; |
+ case GR_GL_PIXEL_PACK_BUFFER: |
+ id = state->fCurrPixelPackBuffer; |
+ break; |
+ case GR_GL_PIXEL_UNPACK_BUFFER: |
+ id = state->fCurrPixelUnpackBuffer; |
+ break; |
} |
if (id > 0) { |
BufferObj* buffer = state->fBufferManager.lookUp(id); |