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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 * support GLES 3.00, some perfectly valid GLSL300 shaders will only compile
with | 45 * support GLES 3.00, some perfectly valid GLSL300 shaders will only compile
with |
46 * #version 100, and will fail to compile with #version 300 es. In the long
term, we | 46 * #version 100, and will fail to compile with #version 300 es. In the long
term, we |
47 * need to lock this down to a specific driver version. | 47 * need to lock this down to a specific driver version. |
48 */ | 48 */ |
49 if (kQualcomm_GrGLVendor == args.fVendor) { | 49 if (kQualcomm_GrGLVendor == args.fVendor) { |
50 args.fGLSLGeneration = k110_GrGLSLGeneration; | 50 args.fGLSLGeneration = k110_GrGLSLGeneration; |
51 } | 51 } |
52 | 52 |
53 args.fRenderer = GrGLGetRendererFromString(renderer); | 53 args.fRenderer = GrGLGetRendererFromString(renderer); |
54 | 54 |
55 args.fIsMesa = GrGLIsMesaFromVersionString(ver); | 55 GrGLGetDriverInfo(interface->fStandard, args.fVendor, renderer, ver, |
56 | 56 &args.fDriver, &args.fDriverVersion); |
57 args.fIsChromium = GrGLIsChromiumFromRendererString(renderer); | |
58 | 57 |
59 args.fContextOptions = &options; | 58 args.fContextOptions = &options; |
60 | 59 |
61 return SkNEW_ARGS(GrGLContext, (args)); | 60 return SkNEW_ARGS(GrGLContext, (args)); |
62 } | 61 } |
63 | 62 |
64 GrGLContextInfo::GrGLContextInfo(const ConstructorArgs& args) { | 63 GrGLContextInfo::GrGLContextInfo(const ConstructorArgs& args) { |
65 fInterface.reset(SkRef(args.fInterface)); | 64 fInterface.reset(SkRef(args.fInterface)); |
66 fGLVersion = args.fGLVersion; | 65 fGLVersion = args.fGLVersion; |
67 fGLSLGeneration = args.fGLSLGeneration; | 66 fGLSLGeneration = args.fGLSLGeneration; |
68 fVendor = args.fVendor; | 67 fVendor = args.fVendor; |
69 fRenderer = args.fRenderer; | 68 fRenderer = args.fRenderer; |
70 fIsMesa = args.fIsMesa; | 69 fDriver = args.fDriver; |
71 fIsChromium = args.fIsChromium; | 70 fDriverVersion = args.fDriverVersion; |
72 | 71 |
73 fGLCaps.reset(SkNEW_ARGS(GrGLCaps, (*args.fContextOptions, *this, fInterface
))); | 72 fGLCaps.reset(SkNEW_ARGS(GrGLCaps, (*args.fContextOptions, *this, fInterface
))); |
74 } | 73 } |
OLD | NEW |