aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src/GrGLVertexBuffer.cpp
diff options
context:
space:
mode:
authorGravatar twiz@google.com <twiz@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-03-14 21:23:01 +0000
committerGravatar twiz@google.com <twiz@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-03-14 21:23:01 +0000
commit59a190bcab5d4b2bf03f8f10cb6a581d19fed403 (patch)
tree86335475250c187f467aeff3bfb8d81084016c1f /gpu/src/GrGLVertexBuffer.cpp
parentcd9d69b9ce7eb301a9fd8d91b9f95fd99b07bae5 (diff)
Implementation of a GL-virtualization layer for Skia. This allows for
environments using skia to specify a GL implementation at run-time, instead of relying on the linker to pull in the appropriate GL impl. A new structure, GrGLInterface is exposed. This struct contains a set of function pointers that should point to an appropriate GL implementation. This change also removes the reliance on GLew on windows builds. Review: http://codereview.appspot.com/4254059/ git-svn-id: http://skia.googlecode.com/svn/trunk@937 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src/GrGLVertexBuffer.cpp')
-rw-r--r--gpu/src/GrGLVertexBuffer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/gpu/src/GrGLVertexBuffer.cpp b/gpu/src/GrGLVertexBuffer.cpp
index ec489367ed..69913bf3eb 100644
--- a/gpu/src/GrGLVertexBuffer.cpp
+++ b/gpu/src/GrGLVertexBuffer.cpp
@@ -1,5 +1,5 @@
/*
- Copyright 2010 Google Inc.
+ Copyright 2011 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -57,8 +57,7 @@ void* GrGLVertexBuffer::lock() {
// Let driver know it can discard the old data
GR_GL(BufferData(GL_ARRAY_BUFFER, size(), NULL,
dynamic() ? GL_DYNAMIC_DRAW : GL_STATIC_DRAW));
- fLockPtr = GR_GLEXT(fGL->extensions(),
- MapBuffer(GL_ARRAY_BUFFER, GR_WRITE_ONLY));
+ fLockPtr = GR_GL(MapBuffer(GL_ARRAY_BUFFER, GR_WRITE_ONLY));
return fLockPtr;
}
return NULL;
@@ -74,7 +73,7 @@ void GrGLVertexBuffer::unlock() {
GrAssert(fGL->supportsBufferLocking());
bind();
- GR_GLEXT(fGL->extensions(), UnmapBuffer(GL_ARRAY_BUFFER));
+ GR_GL(UnmapBuffer(GL_ARRAY_BUFFER));
fLockPtr = NULL;
}