aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-01 18:10:41 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-01 18:10:41 +0000
commitdf8114d84616f8a85a5064f8deef2cca083193f8 (patch)
treef5331dbd96c2e41d2f6151da5340fdbac10ae354
parentc5d71e2a9714e5e86a959d6aaeb31d5434d26619 (diff)
Fix mesa issues.
R=robertphillips@google.com Review URL: https://codereview.chromium.org/12389055 git-svn-id: http://skia.googlecode.com/svn/trunk@7928 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp12
-rw-r--r--src/gpu/gl/mesa/SkMesaGLContext.cpp2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp b/src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp
index 5fdd5c618e..6ccd9fa734 100644
--- a/src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp
+++ b/src/gpu/gl/mesa/GrGLCreateMesaInterface.cpp
@@ -24,15 +24,13 @@
const GrGLInterface* GrGLCreateMesaInterface() {
if (NULL != OSMesaGetCurrentContext()) {
- GrGLGetStringProc getString =
- (GrGLGetStringProc) OSMesaGetProcAddress("glGetString");
- GrGLGetStringiProc glGetStringi =
- (GrGLGetStringiProc) OSMesaGetProcAddress("glGetStringi");
- GrGLGetIntegervProc glGetIntegerv =
- (GrGLGetIntegervProc) OSMesaGetProcAddress("glGetIntegerv");
+ GrGLGetStringProc getString = (GrGLGetStringProc) OSMesaGetProcAddress("glGetString");
+ GrGLGetStringiProc getStringi = (GrGLGetStringiProc) OSMesaGetProcAddress("glGetStringi");
+ GrGLGetIntegervProc getIntegerv =
+ (GrGLGetIntegervProc) OSMesaGetProcAddress("glGetIntegerv");
GrGLExtensions extensions;
- if (!extensions.init(kDesktop_GrGLBinding, glGetString, glGetStringi, glGetIntegerv)) {
+ if (!extensions.init(kDesktop_GrGLBinding, getString, getStringi, getIntegerv)) {
return NULL;
}
diff --git a/src/gpu/gl/mesa/SkMesaGLContext.cpp b/src/gpu/gl/mesa/SkMesaGLContext.cpp
index 6c6e4228f3..2be0c13036 100644
--- a/src/gpu/gl/mesa/SkMesaGLContext.cpp
+++ b/src/gpu/gl/mesa/SkMesaGLContext.cpp
@@ -42,10 +42,12 @@ SkMesaGLContext::~SkMesaGLContext() {
void SkMesaGLContext::destroyGLContext() {
if (fImage) {
sk_free(fImage);
+ fImage = NULL;
}
if (fContext) {
OSMesaDestroyContext((OSMesaContext)fContext);
+ fContext = static_cast<Context>(NULL);
}
}