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

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

Issue 1151603005: Revert of Store context options on caps. (Closed) Base URL: https://skia.googlesource.com/skia.git@onecaps
Patch Set: Created 5 years, 7 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
« no previous file with comments | « src/gpu/gl/GrGLContext.h ('k') | src/gpu/gl/GrGLGpu.h » ('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 * 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 ////////////////////////////////////////////////////////////////////////////////
11 11
12 GrGLContext* GrGLContext::Create(const GrGLInterface* interface, const GrContext Options& options) { 12 GrGLContext* GrGLContext::Create(const GrGLInterface* interface) {
13 // We haven't validated the GrGLInterface yet, so check for GetString functi on pointer 13 // We haven't validated the GrGLInterface yet, so check for GetString functi on pointer
14 if (!interface->fFunctions.fGetString) { 14 if (!interface->fFunctions.fGetString) {
15 return NULL; 15 return NULL;
16 } 16 }
17 ConstructorArgs args; 17 ConstructorArgs args;
18 args.fInterface = interface; 18 args.fInterface = interface;
19 19
20 const GrGLubyte* verUByte; 20 const GrGLubyte* verUByte;
21 GR_GL_CALL_RET(interface, verUByte, GetString(GR_GL_VERSION)); 21 GR_GL_CALL_RET(interface, verUByte, GetString(GR_GL_VERSION));
22 const char* ver = reinterpret_cast<const char*>(verUByte); 22 const char* ver = reinterpret_cast<const char*>(verUByte);
(...skipping 25 matching lines...) Expand all
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 args.fIsMesa = GrGLIsMesaFromVersionString(ver);
56 56
57 args.fIsChromium = GrGLIsChromiumFromRendererString(renderer); 57 args.fIsChromium = GrGLIsChromiumFromRendererString(renderer);
58
59 args.fContextOptions = &options;
60
61 return SkNEW_ARGS(GrGLContext, (args)); 58 return SkNEW_ARGS(GrGLContext, (args));
62 } 59 }
63 60
64 GrGLContextInfo::GrGLContextInfo(const ConstructorArgs& args) { 61 GrGLContextInfo::GrGLContextInfo(const ConstructorArgs& args) {
65 fInterface.reset(SkRef(args.fInterface)); 62 fInterface.reset(SkRef(args.fInterface));
66 fGLVersion = args.fGLVersion; 63 fGLVersion = args.fGLVersion;
67 fGLSLGeneration = args.fGLSLGeneration; 64 fGLSLGeneration = args.fGLSLGeneration;
68 fVendor = args.fVendor; 65 fVendor = args.fVendor;
69 fRenderer = args.fRenderer; 66 fRenderer = args.fRenderer;
70 fIsMesa = args.fIsMesa; 67 fIsMesa = args.fIsMesa;
71 fIsChromium = args.fIsChromium; 68 fIsChromium = args.fIsChromium;
72 69
73 fGLCaps.reset(SkNEW_ARGS(GrGLCaps, (*args.fContextOptions, *this, fInterface ))); 70 fGLCaps.reset(SkNEW_ARGS(GrGLCaps, (*this, fInterface)));
74 } 71 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLContext.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698