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

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

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/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLContext.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 * 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 8
9 #ifndef GrGLContext_DEFINED 9 #ifndef GrGLContext_DEFINED
10 #define GrGLContext_DEFINED 10 #define GrGLContext_DEFINED
11 11
12 #include "gl/GrGLExtensions.h" 12 #include "gl/GrGLExtensions.h"
13 #include "gl/GrGLInterface.h" 13 #include "gl/GrGLInterface.h"
14 #include "GrGLCaps.h" 14 #include "GrGLCaps.h"
15 #include "GrGLSL.h" 15 #include "GrGLSL.h"
16 #include "GrGLUtil.h" 16 #include "GrGLUtil.h"
17 17
18 struct GrContextOptions; 18 #include "SkString.h"
19 19
20 /** 20 /**
21 * Encapsulates information about an OpenGL context including the OpenGL 21 * Encapsulates information about an OpenGL context including the OpenGL
22 * version, the GrGLStandard type of the context, and GLSL version. 22 * version, the GrGLStandard type of the context, and GLSL version.
23 */ 23 */
24 class GrGLContextInfo : public SkNoncopyable { 24 class GrGLContextInfo : public SkNoncopyable {
25 public: 25 public:
26 GrGLStandard standard() const { return fInterface->fStandard; } 26 GrGLStandard standard() const { return fInterface->fStandard; }
27 GrGLVersion version() const { return fGLVersion; } 27 GrGLVersion version() const { return fGLVersion; }
28 GrGLSLGeneration glslGeneration() const { return fGLSLGeneration; } 28 GrGLSLGeneration glslGeneration() const { return fGLSLGeneration; }
(...skipping 15 matching lines...) Expand all
44 44
45 protected: 45 protected:
46 struct ConstructorArgs { 46 struct ConstructorArgs {
47 const GrGLInterface* fInterface; 47 const GrGLInterface* fInterface;
48 GrGLVersion fGLVersion; 48 GrGLVersion fGLVersion;
49 GrGLSLGeneration fGLSLGeneration; 49 GrGLSLGeneration fGLSLGeneration;
50 GrGLVendor fVendor; 50 GrGLVendor fVendor;
51 GrGLRenderer fRenderer; 51 GrGLRenderer fRenderer;
52 bool fIsMesa; 52 bool fIsMesa;
53 bool fIsChromium; 53 bool fIsChromium;
54 const GrContextOptions* fContextOptions;
55 }; 54 };
56 55
57 GrGLContextInfo(const ConstructorArgs& args); 56 GrGLContextInfo(const ConstructorArgs& args);
58 57
59 SkAutoTUnref<const GrGLInterface> fInterface; 58 SkAutoTUnref<const GrGLInterface> fInterface;
60 GrGLVersion fGLVersion; 59 GrGLVersion fGLVersion;
61 GrGLSLGeneration fGLSLGeneration; 60 GrGLSLGeneration fGLSLGeneration;
62 GrGLVendor fVendor; 61 GrGLVendor fVendor;
63 GrGLRenderer fRenderer; 62 GrGLRenderer fRenderer;
64 bool fIsMesa; 63 bool fIsMesa;
65 bool fIsChromium; 64 bool fIsChromium;
66 SkAutoTUnref<GrGLCaps> fGLCaps; 65 SkAutoTUnref<GrGLCaps> fGLCaps;
67 }; 66 };
68 67
69 /** 68 /**
70 * Extension of GrGLContextInfo that also provides access to GrGLInterface. 69 * Extension of GrGLContextInfo that also provides access to GrGLInterface.
71 */ 70 */
72 class GrGLContext : public GrGLContextInfo { 71 class GrGLContext : public GrGLContextInfo {
73 public: 72 public:
74 /** 73 /**
75 * Creates a GrGLContext from a GrGLInterface and the currently 74 * Creates a GrGLContext from a GrGLInterface and the currently
76 * bound OpenGL context accessible by the GrGLInterface. 75 * bound OpenGL context accessible by the GrGLInterface.
77 */ 76 */
78 static GrGLContext* Create(const GrGLInterface* interface, const GrContextOp tions& options); 77 static GrGLContext* Create(const GrGLInterface* interface);
79 78
80 const GrGLInterface* interface() const { return fInterface; } 79 const GrGLInterface* interface() const { return fInterface; }
81 80
82 private: 81 private:
83 GrGLContext(const ConstructorArgs& args) : INHERITED(args) {} 82 GrGLContext(const ConstructorArgs& args) : INHERITED(args) {}
84 83
85 typedef GrGLContextInfo INHERITED; 84 typedef GrGLContextInfo INHERITED;
86 }; 85 };
87 86
88 #endif 87 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698