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

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

Issue 23477079: Fix to allow ovals GM to finish on N7 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/effects/gradients/SkGradientShader.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
(...skipping 29 matching lines...) Expand all
40 * Initializes a GrGLContextInfo from a GrGLInterface and the currently 40 * Initializes a GrGLContextInfo from a GrGLInterface and the currently
41 * bound OpenGL context accessible by the GrGLInterface. 41 * bound OpenGL context accessible by the GrGLInterface.
42 */ 42 */
43 bool initialize(const GrGLInterface* interface); 43 bool initialize(const GrGLInterface* interface);
44 bool isInitialized() const; 44 bool isInitialized() const;
45 45
46 GrGLBinding binding() const { return fBindingInUse; } 46 GrGLBinding binding() const { return fBindingInUse; }
47 GrGLVersion version() const { return fGLVersion; } 47 GrGLVersion version() const { return fGLVersion; }
48 GrGLSLGeneration glslGeneration() const { return fGLSLGeneration; } 48 GrGLSLGeneration glslGeneration() const { return fGLSLGeneration; }
49 GrGLVendor vendor() const { return fVendor; } 49 GrGLVendor vendor() const { return fVendor; }
50 GrGLRenderer renderer() const { return fRenderer; }
jvanverth1 2013/09/17 17:59:12 Why renderer rather than GPU?
bsalomon 2013/09/17 18:00:38 I was just mimicking the GL terminology.
50 /** Is this a mesa-based driver. Does not mean it is the osmesa software ras terizer. */ 51 /** Is this a mesa-based driver. Does not mean it is the osmesa software ras terizer. */
51 bool isMesa() const { return fIsMesa; } 52 bool isMesa() const { return fIsMesa; }
52 const GrGLCaps* caps() const { return fGLCaps.get(); } 53 const GrGLCaps* caps() const { return fGLCaps.get(); }
53 GrGLCaps* caps() { return fGLCaps; } 54 GrGLCaps* caps() { return fGLCaps; }
54 const GrGLExtensions& extensions() const { return fExtensions; } 55 const GrGLExtensions& extensions() const { return fExtensions; }
55 56
56 /** 57 /**
57 * Shortcut for extensions().has(ext); 58 * Shortcut for extensions().has(ext);
58 */ 59 */
59 bool hasExtension(const char* ext) const { 60 bool hasExtension(const char* ext) const {
60 if (!this->isInitialized()) { 61 if (!this->isInitialized()) {
61 return false; 62 return false;
62 } 63 }
63 return fExtensions.has(ext); 64 return fExtensions.has(ext);
64 } 65 }
65 66
66 /** 67 /**
67 * Reset the information 68 * Reset the information
68 */ 69 */
69 void reset(); 70 void reset();
70 71
71 private: 72 private:
72 73
73 GrGLBinding fBindingInUse; 74 GrGLBinding fBindingInUse;
74 GrGLVersion fGLVersion; 75 GrGLVersion fGLVersion;
75 GrGLSLGeneration fGLSLGeneration; 76 GrGLSLGeneration fGLSLGeneration;
76 GrGLVendor fVendor; 77 GrGLVendor fVendor;
78 GrGLRenderer fRenderer;
77 GrGLExtensions fExtensions; 79 GrGLExtensions fExtensions;
78 bool fIsMesa; 80 bool fIsMesa;
79 SkAutoTUnref<GrGLCaps> fGLCaps; 81 SkAutoTUnref<GrGLCaps> fGLCaps;
80 }; 82 };
81 83
82 /** 84 /**
83 * Encapsulates the GrGLInterface used to make GL calls plus information 85 * Encapsulates the GrGLInterface used to make GL calls plus information
84 * about the context (via GrGLContextInfo). 86 * about the context (via GrGLContextInfo).
85 */ 87 */
86 class GrGLContext { 88 class GrGLContext {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 GrGLContextInfo& info() { return fInfo; } 122 GrGLContextInfo& info() { return fInfo; }
121 123
122 private: 124 private:
123 void reset(); 125 void reset();
124 126
125 const GrGLInterface* fInterface; 127 const GrGLInterface* fInterface;
126 GrGLContextInfo fInfo; 128 GrGLContextInfo fInfo;
127 }; 129 };
128 130
129 #endif 131 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/gl/GrGLContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698