blob: d9ad1f49d268995f2c4b04520fd5507f0fbb3793 [file] [log] [blame]
reed@google.comac10a2d2010-12-22 21:39:39 +00001/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00002 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
reed@google.comac10a2d2010-12-22 21:39:39 +00006 */
7
8
epoger@google.comec3ed6a2011-07-28 14:26:00 +00009
reed@google.comac10a2d2010-12-22 21:39:39 +000010#ifndef GrGpuGL_DEFINED
11#define GrGpuGL_DEFINED
12
bsalomon@google.comc1d2a582012-06-01 15:08:19 +000013#include "GrBinHashKey.h"
tomhudson@google.comd8f856c2012-05-10 12:13:36 +000014#include "GrDrawState.h"
15#include "GrGpu.h"
bsalomon@google.com89ec61e2012-02-10 20:05:18 +000016#include "GrGLContextInfo.h"
bsalomon@google.com4043ae22011-08-02 14:19:11 +000017#include "GrGLIndexBuffer.h"
bsalomon@google.com81c3f8d2011-08-03 15:18:33 +000018#include "GrGLIRect.h"
bsalomon@google.com5739d2c2012-05-31 15:07:19 +000019#include "GrGLProgram.h"
bsalomon@google.com81c3f8d2011-08-03 15:18:33 +000020#include "GrGLStencilBuffer.h"
21#include "GrGLTexture.h"
22#include "GrGLVertexBuffer.h"
bsalomon@google.comc1d2a582012-06-01 15:08:19 +000023#include "../GrTHashCache.h"
reed@google.comac10a2d2010-12-22 21:39:39 +000024
25class GrGpuGL : public GrGpu {
26public:
bsalomon@google.com5739d2c2012-05-31 15:07:19 +000027 GrGpuGL(const GrGLContextInfo& ctxInfo);
reed@google.comac10a2d2010-12-22 21:39:39 +000028 virtual ~GrGpuGL();
29
rmistry@google.comd6176b02012-08-23 18:14:13 +000030 const GrGLInterface* glInterface() const {
bsalomon@google.com89ec61e2012-02-10 20:05:18 +000031 return fGLContextInfo.interface();
32 }
tomhudson@google.comdd182cb2012-02-10 21:01:00 +000033 GrGLBinding glBinding() const { return fGLContextInfo.binding(); }
34 GrGLVersion glVersion() const { return fGLContextInfo.version(); }
35 GrGLSLGeneration glslGeneration() const {
bsalomon@google.com89ec61e2012-02-10 20:05:18 +000036 return fGLContextInfo.glslGeneration();
37 }
bsalomon@google.com0b77d682011-08-19 13:28:54 +000038
bsalomon@google.com34cccde2013-01-04 18:34:30 +000039 // Used by GrGLProgram to bind necessary textures for GrGLEffects.
40 void bindTexture(int unitIdx, const GrTextureParams& params, GrGLTexture* texture);
41
bsalomon@google.coma45afcf2013-02-04 18:46:49 +000042 bool programUnitTest(int maxStages);
bsalomon@google.com34cccde2013-01-04 18:34:30 +000043
bsalomon@google.com56d11e02011-11-30 19:59:08 +000044 // GrGpu overrides
bsalomon@google.com9c680582013-02-06 18:17:50 +000045 virtual GrPixelConfig preferredReadPixelsConfig(GrPixelConfig config) const SK_OVERRIDE;
46 virtual GrPixelConfig preferredWritePixelsConfig(GrPixelConfig config) const SK_OVERRIDE;
47 virtual bool canWriteTexturePixels(const GrTexture*, GrPixelConfig srcConfig) const SK_OVERRIDE;
bsalomon@google.comc4364992011-11-07 15:54:49 +000048 virtual bool readPixelsWillPayForYFlip(
49 GrRenderTarget* renderTarget,
50 int left, int top,
51 int width, int height,
52 GrPixelConfig config,
bsalomon@google.com56d11e02011-11-30 19:59:08 +000053 size_t rowBytes) const SK_OVERRIDE;
54 virtual bool fullReadPixelsIsFasterThanPartial() const SK_OVERRIDE;
bsalomon@google.com75f9f252012-01-31 13:35:56 +000055
bsalomon@google.com5739d2c2012-05-31 15:07:19 +000056 virtual void abandonResources() SK_OVERRIDE;
57
bsalomon@google.com02ddc8b2013-01-28 15:35:28 +000058private:
bsalomon@google.com1c13c962011-02-14 16:51:21 +000059 // GrGpu overrides
bsalomon@google.com1bf1c212011-11-05 12:18:58 +000060 virtual void onResetContext() SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +000061
bsalomon@google.comfea37b52011-04-25 15:51:06 +000062 virtual GrTexture* onCreateTexture(const GrTextureDesc& desc,
bsalomon@google.combcdbbe62011-04-12 15:40:00 +000063 const void* srcData,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000064 size_t rowBytes) SK_OVERRIDE;
bsalomon@google.combcdbbe62011-04-12 15:40:00 +000065 virtual GrVertexBuffer* onCreateVertexBuffer(uint32_t size,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000066 bool dynamic) SK_OVERRIDE;
bsalomon@google.combcdbbe62011-04-12 15:40:00 +000067 virtual GrIndexBuffer* onCreateIndexBuffer(uint32_t size,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000068 bool dynamic) SK_OVERRIDE;
bsalomon@google.com64aef2b2012-06-11 15:36:13 +000069 virtual GrPath* onCreatePath(const SkPath&) SK_OVERRIDE;
bsalomon@google.com16e3dde2012-10-25 18:43:28 +000070 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) SK_OVERRIDE;
71 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&) SK_OVERRIDE;
bsalomon@google.com81c3f8d2011-08-03 15:18:33 +000072 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000073 int width,
74 int height) SK_OVERRIDE;
75 virtual bool attachStencilBufferToRenderTarget(
76 GrStencilBuffer* sb,
77 GrRenderTarget* rt) SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +000078
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000079 virtual void onClear(const GrIRect* rect, GrColor color) SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +000080
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000081 virtual void onForceRenderTargetFlush() SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +000082
bsalomon@google.com5877ffd2011-04-11 17:58:48 +000083 virtual bool onReadPixels(GrRenderTarget* target,
rmistry@google.comd6176b02012-08-23 18:14:13 +000084 int left, int top,
bsalomon@google.comc6980972011-11-02 19:57:21 +000085 int width, int height,
rmistry@google.comd6176b02012-08-23 18:14:13 +000086 GrPixelConfig,
bsalomon@google.comc4364992011-11-07 15:54:49 +000087 void* buffer,
senorblanco@chromium.org3cb406b2013-02-05 19:50:46 +000088 size_t rowBytes) SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +000089
bsalomon@google.com9c680582013-02-06 18:17:50 +000090 virtual bool onWriteTexturePixels(GrTexture* texture,
bsalomon@google.com6f379512011-11-16 20:36:03 +000091 int left, int top, int width, int height,
92 GrPixelConfig config, const void* buffer,
93 size_t rowBytes) SK_OVERRIDE;
94
bsalomon@google.com75f9f252012-01-31 13:35:56 +000095 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE;
96
bsalomon@google.com74749cd2013-01-30 16:12:41 +000097 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE;
bsalomon@google.comded4f4b2012-06-28 18:48:06 +000098
99 virtual void setStencilPathSettings(const GrPath&,
sugoi@google.com12b4e272012-12-06 20:13:11 +0000100 SkPath::FillType,
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000101 GrStencilSettings* settings)
102 SK_OVERRIDE;
sugoi@google.com12b4e272012-12-06 20:13:11 +0000103 virtual void onGpuStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE;
robertphillips@google.com730ebe52012-04-16 16:33:13 +0000104
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +0000105 virtual void clearStencil() SK_OVERRIDE;
106 virtual void clearStencilClip(const GrIRect& rect,
107 bool insideClip) SK_OVERRIDE;
bsalomon@google.com64aef2b2012-06-11 15:36:13 +0000108 virtual bool flushGraphicsState(DrawType) SK_OVERRIDE;
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000109
bsalomon@google.com49209392012-06-05 15:13:46 +0000110 const GrGLCaps& glCaps() const { return fGLContextInfo.caps(); }
bsalomon@google.com5782d712011-01-21 21:03:59 +0000111
bsalomon@google.com1c13c962011-02-14 16:51:21 +0000112 // binds texture unit in GL
bsalomon@google.com8531c1c2011-01-13 19:52:45 +0000113 void setTextureUnit(int unitIdx);
reed@google.comac10a2d2010-12-22 21:39:39 +0000114
bsalomon@google.com74749cd2013-01-30 16:12:41 +0000115 // Sets up vertex attribute pointers and strides. On return startIndexOffset specifies an
116 // offset into the index buffer to the first index to be read (in addition to
117 // info.startIndex()). It accounts for the fact that index buffer pool may have provided space
118 // in the middle of a larger index buffer.
119 void setupGeometry(const DrawInfo& info, int* startIndexOffset);
120 // binds appropriate vertex and index buffers, also returns any extra verts or indices to
121 // offset by based on how space was allocated in pool VB/IBs.
bsalomon@google.com02ddc8b2013-01-28 15:35:28 +0000122 void setBuffers(bool indexed, int* extraVertexOffset, int* extraIndexOffset);
bsalomon@google.com7acdb8e2011-02-11 14:07:02 +0000123
bsalomon@google.com86c1f712011-10-12 14:54:26 +0000124 // Subclasses should call this to flush the blend state.
bsalomon@google.com74749cd2013-01-30 16:12:41 +0000125 // The params should be the final coefficients to apply
bsalomon@google.com86c1f712011-10-12 14:54:26 +0000126 // (after any blending optimizations or dual source blending considerations
127 // have been accounted for).
bsalomon@google.com02ddc8b2013-01-28 15:35:28 +0000128 void flushBlend(bool isLines, GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff);
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000129
bsalomon@google.com89ec61e2012-02-10 20:05:18 +0000130 bool hasExtension(const char* ext) const {
131 return fGLContextInfo.hasExtension(ext);
bsalomon@google.com96399942012-02-13 14:39:16 +0000132 }
133
134 const GrGLContextInfo& glContextInfo() const { return fGLContextInfo; }
bsalomon@google.com2c17fcd2011-07-06 17:47:02 +0000135
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000136 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff);
bsalomon@google.com080773c2011-03-15 19:09:25 +0000137
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000138 // for readability of function impls
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000139 typedef GrGLProgram::Desc ProgramDesc;
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000140
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000141 class ProgramCache : public ::GrNoncopyable {
142 public:
143 ProgramCache(const GrGLContextInfo& gl);
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000144
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000145 void abandon();
bsalomon@google.com2eaaefd2012-10-29 19:51:22 +0000146 GrGLProgram* getProgram(const GrGLProgram::Desc& desc, const GrEffectStage* stages[]);
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000147 private:
148 enum {
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000149 kKeySize = sizeof(ProgramDesc),
150 // We may actually have kMaxEntries+1 shaders in the GL context because we create a new
151 // shader before evicting from the cache.
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000152 kMaxEntries = 32
153 };
154
155 class Entry;
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000156 // The value of the hash key is based on the ProgramDesc.
157 typedef GrTBinHashKey<Entry, kKeySize> ProgramHashKey;
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000158
159 class Entry : public ::GrNoncopyable {
160 public:
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000161 Entry() : fProgram(NULL), fLRUStamp(0) {}
162 Entry& operator = (const Entry& entry) {
163 GrSafeRef(entry.fProgram.get());
164 fProgram.reset(entry.fProgram.get());
165 fKey = entry.fKey;
166 fLRUStamp = entry.fLRUStamp;
167 return *this;
168 }
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000169 int compare(const ProgramHashKey& key) const {
170 return fKey.compare(key);
171 }
172
173 public:
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000174 SkAutoTUnref<GrGLProgram> fProgram;
175 ProgramHashKey fKey;
176 unsigned int fLRUStamp; // Move outside entry?
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000177 };
178
179 GrTHashTable<Entry, ProgramHashKey, 8> fHashCache;
180
181 Entry fEntries[kMaxEntries];
182 int fCount;
183 unsigned int fCurrLRUStamp;
184 const GrGLContextInfo& fGL;
185 };
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000186
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000187 // sets the color specified by GrDrawState::setColor()
188 void flushColor(GrColor color);
189
190 // sets the color specified by GrDrawState::setCoverage()
191 void flushCoverage(GrColor color);
192
193 // sets the MVP matrix uniform for currently bound program
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000194 void flushViewMatrix(DrawType type);
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000195
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000196
bsalomon@google.comc96cb3a2012-06-04 19:31:00 +0000197 // flushes dithering, color-mask, and face culling stat
198 void flushMiscFixedFunctionState();
199
bsalomon@google.coma3201942012-06-21 19:58:20 +0000200 // flushes the scissor. see the note on flushBoundTextureAndParams about
201 // flushing the scissor after that function is called.
202 void flushScissor();
203
bsalomon@google.com64aef2b2012-06-11 15:36:13 +0000204 void buildProgram(bool isPoints,
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000205 BlendOptFlags blendOpts,
206 GrBlendCoeff dstCoeff,
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000207 ProgramDesc* desc);
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000208
bsalomon@google.com67e78c92012-10-17 13:36:14 +0000209 // Inits GrDrawTarget::Caps, subclass may enable additional caps.
bsalomon@google.com18c9c192011-09-22 21:01:31 +0000210 void initCaps();
211
212 void initFSAASupport();
bsalomon@google.com6aa25c32011-04-27 19:55:29 +0000213
bsalomon@google.com2c17fcd2011-07-06 17:47:02 +0000214 // determines valid stencil formats
bsalomon@google.com18c9c192011-09-22 21:01:31 +0000215 void initStencilFormats();
bsalomon@google.com2c17fcd2011-07-06 17:47:02 +0000216
reed@google.comac10a2d2010-12-22 21:39:39 +0000217 // notify callbacks to update state tracking when related
218 // objects are bound to GL or deleted outside of the class
219 void notifyVertexBufferBind(const GrGLVertexBuffer* buffer);
220 void notifyVertexBufferDelete(const GrGLVertexBuffer* buffer);
221 void notifyIndexBufferBind(const GrGLIndexBuffer* buffer);
222 void notifyIndexBufferDelete(const GrGLIndexBuffer* buffer);
reed@google.comac10a2d2010-12-22 21:39:39 +0000223 void notifyTextureDelete(GrGLTexture* texture);
224 void notifyRenderTargetDelete(GrRenderTarget* renderTarget);
bsalomon@google.com5782d712011-01-21 21:03:59 +0000225
bsalomon@google.com8531c1c2011-01-13 19:52:45 +0000226 void setSpareTextureUnit();
reed@google.comac10a2d2010-12-22 21:39:39 +0000227
bsalomon@google.com8295dc12011-05-02 12:53:34 +0000228 // bound is region that may be modified and therefore has to be resolved.
229 // NULL means whole target. Can be an empty rect.
230 void flushRenderTarget(const GrIRect* bound);
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000231 void flushStencil(DrawType);
232 void flushAAState(DrawType);
bsalomon@google.com0650e812011-04-08 18:07:53 +0000233
bsalomon@google.com280e99f2012-01-05 16:17:38 +0000234 bool configToGLFormats(GrPixelConfig config,
235 bool getSizedInternal,
236 GrGLenum* internalFormat,
237 GrGLenum* externalFormat,
238 GrGLenum* externalType);
bsalomon@google.com6f379512011-11-16 20:36:03 +0000239 // helper for onCreateTexture and writeTexturePixels
bsalomon@google.com136f55b2011-11-28 18:34:44 +0000240 bool uploadTexData(const GrGLTexture::Desc& desc,
bsalomon@google.com1e0e6072011-11-28 18:49:37 +0000241 bool isNewTexture,
bsalomon@google.com6f379512011-11-16 20:36:03 +0000242 int left, int top, int width, int height,
243 GrPixelConfig dataConfig,
244 const void* data,
245 size_t rowBytes);
bsalomon@google.com0650e812011-04-08 18:07:53 +0000246
bsalomon@google.com81c3f8d2011-08-03 15:18:33 +0000247 bool createRenderTargetObjects(int width, int height,
248 GrGLuint texID,
249 GrGLRenderTarget::Desc* desc);
250
robertphillips@google.com99a5ac02012-04-10 19:26:38 +0000251 void fillInConfigRenderableTable();
252
reed@google.comac10a2d2010-12-22 21:39:39 +0000253 friend class GrGLVertexBuffer;
254 friend class GrGLIndexBuffer;
255 friend class GrGLTexture;
256 friend class GrGLRenderTarget;
257
bsalomon@google.com89ec61e2012-02-10 20:05:18 +0000258 GrGLContextInfo fGLContextInfo;
bsalomon@google.com2c17fcd2011-07-06 17:47:02 +0000259
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000260 // GL program-related state
261 ProgramCache* fProgramCache;
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000262 SkAutoTUnref<GrGLProgram> fCurrentProgram;
bsalomon@google.com49209392012-06-05 15:13:46 +0000263
264 ///////////////////////////////////////////////////////////////////////////
265 ///@name Caching of GL State
266 ///@{
267 int fHWActiveTextureUnitIdx;
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000268 GrGLuint fHWProgramID;
269 GrColor fHWConstAttribColor;
270 GrColor fHWConstAttribCoverage;
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000271
bsalomon@google.com49209392012-06-05 15:13:46 +0000272 enum TriState {
273 kNo_TriState,
274 kYes_TriState,
275 kUnknown_TriState
276 };
277
bsalomon@google.coma3201942012-06-21 19:58:20 +0000278 // last scissor / viewport scissor state seen by the GL.
279 struct {
280 TriState fEnabled;
281 GrGLIRect fRect;
282 void invalidate() {
283 fEnabled = kUnknown_TriState;
284 fRect.invalidate();
285 }
286 } fHWScissorSettings;
287
288 GrGLIRect fHWViewport;
289
bsalomon@google.com49209392012-06-05 15:13:46 +0000290 struct {
291 size_t fVertexOffset;
292 GrVertexLayout fVertexLayout;
293 const GrVertexBuffer* fVertexBuffer;
294 const GrIndexBuffer* fIndexBuffer;
295 bool fArrayPtrsDirty;
296 } fHWGeometryState;
bsalomon@google.com5782d712011-01-21 21:03:59 +0000297
bsalomon@google.coma4d8fc22012-05-21 13:21:46 +0000298 struct {
299 GrBlendCoeff fSrcCoeff;
300 GrBlendCoeff fDstCoeff;
301 GrColor fConstColor;
302 bool fConstColorValid;
303 TriState fEnabled;
304
305 void invalidate() {
bsalomon@google.com47059542012-06-06 20:51:20 +0000306 fSrcCoeff = kInvalid_GrBlendCoeff;
307 fDstCoeff = kInvalid_GrBlendCoeff;
bsalomon@google.coma4d8fc22012-05-21 13:21:46 +0000308 fConstColorValid = false;
309 fEnabled = kUnknown_TriState;
310 }
311 } fHWBlendState;
312
bsalomon@google.com4d5f3fe2012-05-21 17:11:44 +0000313 struct {
314 TriState fMSAAEnabled;
315 TriState fSmoothLineEnabled;
316 void invalidate() {
317 fMSAAEnabled = kUnknown_TriState;
318 fSmoothLineEnabled = kUnknown_TriState;
319 }
320 } fHWAAState;
321
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000322 struct {
senorblanco@chromium.org3cb406b2013-02-05 19:50:46 +0000323 SkMatrix fViewMatrix;
324 SkISize fRTSize;
325 GrSurfaceOrigin fLastOrigin;
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000326 void invalidate() {
bsalomon@google.comb9086a02012-11-01 18:02:54 +0000327 fViewMatrix = SkMatrix::InvalidMatrix();
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000328 fRTSize.fWidth = -1; // just make the first value compared illegal.
senorblanco@chromium.org3cb406b2013-02-05 19:50:46 +0000329 fLastOrigin = (GrSurfaceOrigin) -1;
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000330 }
331 } fHWPathMatrixState;
332
bsalomon@google.coma3201942012-06-21 19:58:20 +0000333 GrStencilSettings fHWStencilSettings;
334 TriState fHWStencilTestEnabled;
bsalomon@google.com457b8a32012-05-21 21:19:58 +0000335
bsalomon@google.comc811ea32012-05-21 15:33:09 +0000336 GrDrawState::DrawFace fHWDrawFace;
337 TriState fHWWriteToColor;
338 TriState fHWDitherEnabled;
339 GrRenderTarget* fHWBoundRenderTarget;
340 GrTexture* fHWBoundTextures[GrDrawState::kNumStages];
bsalomon@google.com49209392012-06-05 15:13:46 +0000341 ///@}
bsalomon@google.com978c8c62012-05-21 14:45:49 +0000342
bsalomon@google.comfe676522011-06-17 18:12:21 +0000343 // we record what stencil format worked last time to hopefully exit early
344 // from our loop that tries stencil formats and calls check fb status.
345 int fLastSuccessfulStencilFmtIdx;
346
bsalomon@google.com18c9c192011-09-22 21:01:31 +0000347 bool fPrintedCaps;
348
reed@google.comac10a2d2010-12-22 21:39:39 +0000349 typedef GrGpu INHERITED;
350};
351
bsalomon@google.coma7f84e12011-03-10 14:13:19 +0000352#endif