OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrGLContext.h" | 8 #include "GrGLContext.h" |
9 | 9 |
10 //////////////////////////////////////////////////////////////////////////////// | 10 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 30 matching lines...) Expand all Loading... |
41 fGLSLGeneration = GrGetGLSLGeneration(interface); | 41 fGLSLGeneration = GrGetGLSLGeneration(interface); |
42 | 42 |
43 fVendor = GrGLGetVendor(interface); | 43 fVendor = GrGLGetVendor(interface); |
44 | 44 |
45 fRenderer = GrGLGetRendererFromString(renderer); | 45 fRenderer = GrGLGetRendererFromString(renderer); |
46 | 46 |
47 fIsMesa = GrGLIsMesaFromVersionString(ver); | 47 fIsMesa = GrGLIsMesaFromVersionString(ver); |
48 | 48 |
49 fIsChromium = GrGLIsChromiumFromRendererString(renderer); | 49 fIsChromium = GrGLIsChromiumFromRendererString(renderer); |
50 | 50 |
| 51 // This must be done before calling GrGLCaps::init() |
| 52 fStandard = interface->fStandard; |
| 53 |
51 fGLCaps->init(*this, interface); | 54 fGLCaps->init(*this, interface); |
52 | 55 |
53 fStandard = interface->fStandard; | |
54 return true; | 56 return true; |
55 } | 57 } |
56 } | 58 } |
57 return false; | 59 return false; |
58 } | 60 } |
59 | 61 |
60 bool GrGLContextInfo::isInitialized() const { | 62 bool GrGLContextInfo::isInitialized() const { |
61 return kNone_GrGLStandard != fStandard; | 63 return kNone_GrGLStandard != fStandard; |
62 } | 64 } |
63 | 65 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 } | 98 } |
97 | 99 |
98 bool GrGLContext::initialize(const GrGLInterface* interface) { | 100 bool GrGLContext::initialize(const GrGLInterface* interface) { |
99 if (fInfo.initialize(interface)) { | 101 if (fInfo.initialize(interface)) { |
100 fInterface = interface; | 102 fInterface = interface; |
101 interface->ref(); | 103 interface->ref(); |
102 return true; | 104 return true; |
103 } | 105 } |
104 return false; | 106 return false; |
105 } | 107 } |
OLD | NEW |