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

Side by Side Diff: src/gpu/gl/SkGLContextHelper.cpp

Issue 140823003: Move GrGLExtensions from GrGLContextInfo to GrGLInterface (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix Android Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/gpu/gl/GrGpuGL.cpp ('k') | src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "gl/SkGLContextHelper.h" 8 #include "gl/SkGLContextHelper.h"
9 #include "GrGLUtil.h" 9 #include "GrGLUtil.h"
10 10
(...skipping 19 matching lines...) Expand all
30 bool SkGLContextHelper::init(int width, int height) { 30 bool SkGLContextHelper::init(int width, int height) {
31 if (fGL) { 31 if (fGL) {
32 fGL->unref(); 32 fGL->unref();
33 this->destroyGLContext(); 33 this->destroyGLContext();
34 } 34 }
35 35
36 fGL = this->createGLContext(); 36 fGL = this->createGLContext();
37 if (fGL) { 37 if (fGL) {
38 const GrGLubyte* temp; 38 const GrGLubyte* temp;
39 39
40 if (!fGL->validate() || !fExtensions.init(fGL)) { 40 if (!fGL->validate()) {
41 fGL = NULL; 41 fGL = NULL;
42 this->destroyGLContext(); 42 this->destroyGLContext();
43 return false; 43 return false;
44 } 44 }
45 45
46 SK_GL_RET(*this, temp, GetString(GR_GL_VERSION)); 46 SK_GL_RET(*this, temp, GetString(GR_GL_VERSION));
47 const char* versionStr = reinterpret_cast<const char*>(temp); 47 const char* versionStr = reinterpret_cast<const char*>(temp);
48 GrGLVersion version = GrGLGetVersionFromString(versionStr); 48 GrGLVersion version = GrGLGetVersionFromString(versionStr);
49 49
50 // clear any existing GL erorrs 50 // clear any existing GL erorrs
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 fGL->unref(); 126 fGL->unref();
127 fGL = NULL; 127 fGL = NULL;
128 this->destroyGLContext(); 128 this->destroyGLContext();
129 return false; 129 return false;
130 } else { 130 } else {
131 return true; 131 return true;
132 } 132 }
133 } 133 }
134 return false; 134 return false;
135 } 135 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGpuGL.cpp ('k') | src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698