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

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

Issue 2288033003: Turned on SkSL->GLSL compiler (Closed)
Patch Set: fixed unused variable error Created 4 years, 3 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 | « gyp/sksl.gyp ('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 "GrGLUtil.h" 15 #include "GrGLUtil.h"
16 16
17 struct GrContextOptions; 17 struct GrContextOptions;
18 namespace SkSL {
19 class Compiler;
20 }
18 21
19 /** 22 /**
20 * Encapsulates information about an OpenGL context including the OpenGL 23 * Encapsulates information about an OpenGL context including the OpenGL
21 * version, the GrGLStandard type of the context, and GLSL version. 24 * version, the GrGLStandard type of the context, and GLSL version.
22 */ 25 */
23 class GrGLContextInfo : public SkRefCnt { 26 class GrGLContextInfo : public SkRefCnt {
24 public: 27 public:
25 GrGLStandard standard() const { return fInterface->fStandard; } 28 GrGLStandard standard() const { return fInterface->fStandard; }
26 GrGLVersion version() const { return fGLVersion; } 29 GrGLVersion version() const { return fGLVersion; }
27 GrGLSLGeneration glslGeneration() const { return fGLSLGeneration; } 30 GrGLSLGeneration glslGeneration() const { return fGLSLGeneration; }
(...skipping 29 matching lines...) Expand all
57 GrGLVersion fGLVersion; 60 GrGLVersion fGLVersion;
58 GrGLSLGeneration fGLSLGeneration; 61 GrGLSLGeneration fGLSLGeneration;
59 GrGLVendor fVendor; 62 GrGLVendor fVendor;
60 GrGLRenderer fRenderer; 63 GrGLRenderer fRenderer;
61 GrGLDriver fDriver; 64 GrGLDriver fDriver;
62 GrGLDriverVersion fDriverVersion; 65 GrGLDriverVersion fDriverVersion;
63 SkAutoTUnref<GrGLCaps> fGLCaps; 66 SkAutoTUnref<GrGLCaps> fGLCaps;
64 }; 67 };
65 68
66 /** 69 /**
67 * Extension of GrGLContextInfo that also provides access to GrGLInterface. 70 * Extension of GrGLContextInfo that also provides access to GrGLInterface and S kSL::Compiler.
68 */ 71 */
69 class GrGLContext : public GrGLContextInfo { 72 class GrGLContext : public GrGLContextInfo {
70 public: 73 public:
71 /** 74 /**
72 * Creates a GrGLContext from a GrGLInterface and the currently 75 * Creates a GrGLContext from a GrGLInterface and the currently
73 * bound OpenGL context accessible by the GrGLInterface. 76 * bound OpenGL context accessible by the GrGLInterface.
74 */ 77 */
75 static GrGLContext* Create(const GrGLInterface* interface, const GrContextOp tions& options); 78 static GrGLContext* Create(const GrGLInterface* interface, const GrContextOp tions& options);
76 79
77 const GrGLInterface* interface() const { return fInterface; } 80 const GrGLInterface* interface() const { return fInterface; }
78 81
82 SkSL::Compiler* compiler();
83
79 private: 84 private:
80 GrGLContext(const ConstructorArgs& args) : INHERITED(args) {} 85 GrGLContext(const ConstructorArgs& args)
86 : INHERITED(args)
87 , fCompiler(nullptr) {}
88
89 ~GrGLContext();
bsalomon 2016/09/12 13:48:57 Should we declare virtual ~GrGLContextInfo()?
ethannicholas 2016/09/12 14:53:26 Good catch, done.
90
91 SkSL::Compiler* fCompiler;
bsalomon 2016/09/12 13:48:57 std::unique_ptr?
81 92
82 typedef GrGLContextInfo INHERITED; 93 typedef GrGLContextInfo INHERITED;
83 }; 94 };
84 95
85 #endif 96 #endif
OLDNEW
« no previous file with comments | « gyp/sksl.gyp ('k') | src/gpu/gl/GrGLContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698