blob: 71cb6998123cab6d89af1d84b4134196037912fa [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.com0a97be22011-11-08 19:20:57 +000045 virtual GrPixelConfig preferredReadPixelsConfig(GrPixelConfig config)
bsalomon@google.com56d11e02011-11-30 19:59:08 +000046 const SK_OVERRIDE;
bsalomon@google.coma85449d2011-11-19 02:36:05 +000047 virtual GrPixelConfig preferredWritePixelsConfig(GrPixelConfig config)
bsalomon@google.com56d11e02011-11-30 19:59:08 +000048 const SK_OVERRIDE;
bsalomon@google.comc4364992011-11-07 15:54:49 +000049 virtual bool readPixelsWillPayForYFlip(
50 GrRenderTarget* renderTarget,
51 int left, int top,
52 int width, int height,
53 GrPixelConfig config,
bsalomon@google.com56d11e02011-11-30 19:59:08 +000054 size_t rowBytes) const SK_OVERRIDE;
55 virtual bool fullReadPixelsIsFasterThanPartial() const SK_OVERRIDE;
bsalomon@google.com75f9f252012-01-31 13:35:56 +000056
bsalomon@google.com5739d2c2012-05-31 15:07:19 +000057 virtual void abandonResources() SK_OVERRIDE;
58
bsalomon@google.com02ddc8b2013-01-28 15:35:28 +000059private:
bsalomon@google.com1c13c962011-02-14 16:51:21 +000060 // GrGpu overrides
bsalomon@google.com1bf1c212011-11-05 12:18:58 +000061 virtual void onResetContext() SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +000062
bsalomon@google.comfea37b52011-04-25 15:51:06 +000063 virtual GrTexture* onCreateTexture(const GrTextureDesc& desc,
bsalomon@google.combcdbbe62011-04-12 15:40:00 +000064 const void* srcData,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000065 size_t rowBytes) SK_OVERRIDE;
bsalomon@google.combcdbbe62011-04-12 15:40:00 +000066 virtual GrVertexBuffer* onCreateVertexBuffer(uint32_t size,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000067 bool dynamic) SK_OVERRIDE;
bsalomon@google.combcdbbe62011-04-12 15:40:00 +000068 virtual GrIndexBuffer* onCreateIndexBuffer(uint32_t size,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000069 bool dynamic) SK_OVERRIDE;
bsalomon@google.com64aef2b2012-06-11 15:36:13 +000070 virtual GrPath* onCreatePath(const SkPath&) SK_OVERRIDE;
bsalomon@google.com16e3dde2012-10-25 18:43:28 +000071 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) SK_OVERRIDE;
72 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&) SK_OVERRIDE;
bsalomon@google.com81c3f8d2011-08-03 15:18:33 +000073 virtual bool createStencilBufferForRenderTarget(GrRenderTarget* rt,
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000074 int width,
75 int height) SK_OVERRIDE;
76 virtual bool attachStencilBufferToRenderTarget(
77 GrStencilBuffer* sb,
78 GrRenderTarget* rt) SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +000079
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000080 virtual void onClear(const GrIRect* rect, GrColor color) SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +000081
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +000082 virtual void onForceRenderTargetFlush() SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +000083
bsalomon@google.com5877ffd2011-04-11 17:58:48 +000084 virtual bool onReadPixels(GrRenderTarget* target,
rmistry@google.comd6176b02012-08-23 18:14:13 +000085 int left, int top,
bsalomon@google.comc6980972011-11-02 19:57:21 +000086 int width, int height,
rmistry@google.comd6176b02012-08-23 18:14:13 +000087 GrPixelConfig,
bsalomon@google.comc4364992011-11-07 15:54:49 +000088 void* buffer,
senorblanco@chromium.org3cb406b2013-02-05 19:50:46 +000089 size_t rowBytes) SK_OVERRIDE;
bsalomon@google.coma7f84e12011-03-10 14:13:19 +000090
bsalomon@google.com6f379512011-11-16 20:36:03 +000091 virtual void onWriteTexturePixels(GrTexture* texture,
92 int left, int top, int width, int height,
93 GrPixelConfig config, const void* buffer,
94 size_t rowBytes) SK_OVERRIDE;
95
bsalomon@google.com75f9f252012-01-31 13:35:56 +000096 virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE;
97
bsalomon@google.com74749cd2013-01-30 16:12:41 +000098 virtual void onGpuDraw(const DrawInfo&) SK_OVERRIDE;
bsalomon@google.comded4f4b2012-06-28 18:48:06 +000099
100 virtual void setStencilPathSettings(const GrPath&,
sugoi@google.com12b4e272012-12-06 20:13:11 +0000101 SkPath::FillType,
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000102 GrStencilSettings* settings)
103 SK_OVERRIDE;
sugoi@google.com12b4e272012-12-06 20:13:11 +0000104 virtual void onGpuStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE;
robertphillips@google.com730ebe52012-04-16 16:33:13 +0000105
bsalomon@google.com13f1b6f2012-05-31 12:52:43 +0000106 virtual void clearStencil() SK_OVERRIDE;
107 virtual void clearStencilClip(const GrIRect& rect,
108 bool insideClip) SK_OVERRIDE;
bsalomon@google.com64aef2b2012-06-11 15:36:13 +0000109 virtual bool flushGraphicsState(DrawType) SK_OVERRIDE;
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000110
bsalomon@google.com49209392012-06-05 15:13:46 +0000111 const GrGLCaps& glCaps() const { return fGLContextInfo.caps(); }
bsalomon@google.com5782d712011-01-21 21:03:59 +0000112
bsalomon@google.com1c13c962011-02-14 16:51:21 +0000113 // binds texture unit in GL
bsalomon@google.com8531c1c2011-01-13 19:52:45 +0000114 void setTextureUnit(int unitIdx);
reed@google.comac10a2d2010-12-22 21:39:39 +0000115
bsalomon@google.com74749cd2013-01-30 16:12:41 +0000116 // Sets up vertex attribute pointers and strides. On return startIndexOffset specifies an
117 // offset into the index buffer to the first index to be read (in addition to
118 // info.startIndex()). It accounts for the fact that index buffer pool may have provided space
119 // in the middle of a larger index buffer.
120 void setupGeometry(const DrawInfo& info, int* startIndexOffset);
121 // binds appropriate vertex and index buffers, also returns any extra verts or indices to
122 // offset by based on how space was allocated in pool VB/IBs.
bsalomon@google.com02ddc8b2013-01-28 15:35:28 +0000123 void setBuffers(bool indexed, int* extraVertexOffset, int* extraIndexOffset);
bsalomon@google.com7acdb8e2011-02-11 14:07:02 +0000124
bsalomon@google.com86c1f712011-10-12 14:54:26 +0000125 // Subclasses should call this to flush the blend state.
bsalomon@google.com74749cd2013-01-30 16:12:41 +0000126 // The params should be the final coefficients to apply
bsalomon@google.com86c1f712011-10-12 14:54:26 +0000127 // (after any blending optimizations or dual source blending considerations
128 // have been accounted for).
bsalomon@google.com02ddc8b2013-01-28 15:35:28 +0000129 void flushBlend(bool isLines, GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff);
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000130
bsalomon@google.com89ec61e2012-02-10 20:05:18 +0000131 bool hasExtension(const char* ext) const {
132 return fGLContextInfo.hasExtension(ext);
bsalomon@google.com96399942012-02-13 14:39:16 +0000133 }
134
135 const GrGLContextInfo& glContextInfo() const { return fGLContextInfo; }
bsalomon@google.com2c17fcd2011-07-06 17:47:02 +0000136
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000137 static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff);
bsalomon@google.com080773c2011-03-15 19:09:25 +0000138
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000139 // for readability of function impls
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000140 typedef GrGLProgram::Desc ProgramDesc;
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000141
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000142 class ProgramCache : public ::GrNoncopyable {
143 public:
144 ProgramCache(const GrGLContextInfo& gl);
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000145
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000146 void abandon();
bsalomon@google.com2eaaefd2012-10-29 19:51:22 +0000147 GrGLProgram* getProgram(const GrGLProgram::Desc& desc, const GrEffectStage* stages[]);
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000148 private:
149 enum {
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000150 kKeySize = sizeof(ProgramDesc),
151 // We may actually have kMaxEntries+1 shaders in the GL context because we create a new
152 // shader before evicting from the cache.
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000153 kMaxEntries = 32
154 };
155
156 class Entry;
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000157 // The value of the hash key is based on the ProgramDesc.
158 typedef GrTBinHashKey<Entry, kKeySize> ProgramHashKey;
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000159
160 class Entry : public ::GrNoncopyable {
161 public:
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000162 Entry() : fProgram(NULL), fLRUStamp(0) {}
163 Entry& operator = (const Entry& entry) {
164 GrSafeRef(entry.fProgram.get());
165 fProgram.reset(entry.fProgram.get());
166 fKey = entry.fKey;
167 fLRUStamp = entry.fLRUStamp;
168 return *this;
169 }
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000170 int compare(const ProgramHashKey& key) const {
171 return fKey.compare(key);
172 }
173
174 public:
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000175 SkAutoTUnref<GrGLProgram> fProgram;
176 ProgramHashKey fKey;
177 unsigned int fLRUStamp; // Move outside entry?
bsalomon@google.comc1d2a582012-06-01 15:08:19 +0000178 };
179
180 GrTHashTable<Entry, ProgramHashKey, 8> fHashCache;
181
182 Entry fEntries[kMaxEntries];
183 int fCount;
184 unsigned int fCurrLRUStamp;
185 const GrGLContextInfo& fGL;
186 };
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000187
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000188 // sets the color specified by GrDrawState::setColor()
189 void flushColor(GrColor color);
190
191 // sets the color specified by GrDrawState::setCoverage()
192 void flushCoverage(GrColor color);
193
194 // sets the MVP matrix uniform for currently bound program
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000195 void flushViewMatrix(DrawType type);
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000196
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000197
bsalomon@google.comc96cb3a2012-06-04 19:31:00 +0000198 // flushes dithering, color-mask, and face culling stat
199 void flushMiscFixedFunctionState();
200
bsalomon@google.coma3201942012-06-21 19:58:20 +0000201 // flushes the scissor. see the note on flushBoundTextureAndParams about
202 // flushing the scissor after that function is called.
203 void flushScissor();
204
bsalomon@google.com64aef2b2012-06-11 15:36:13 +0000205 void buildProgram(bool isPoints,
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000206 BlendOptFlags blendOpts,
207 GrBlendCoeff dstCoeff,
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000208 ProgramDesc* desc);
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000209
bsalomon@google.com67e78c92012-10-17 13:36:14 +0000210 // Inits GrDrawTarget::Caps, subclass may enable additional caps.
bsalomon@google.com18c9c192011-09-22 21:01:31 +0000211 void initCaps();
212
213 void initFSAASupport();
bsalomon@google.com6aa25c32011-04-27 19:55:29 +0000214
bsalomon@google.com2c17fcd2011-07-06 17:47:02 +0000215 // determines valid stencil formats
bsalomon@google.com18c9c192011-09-22 21:01:31 +0000216 void initStencilFormats();
bsalomon@google.com2c17fcd2011-07-06 17:47:02 +0000217
reed@google.comac10a2d2010-12-22 21:39:39 +0000218 // notify callbacks to update state tracking when related
219 // objects are bound to GL or deleted outside of the class
220 void notifyVertexBufferBind(const GrGLVertexBuffer* buffer);
221 void notifyVertexBufferDelete(const GrGLVertexBuffer* buffer);
222 void notifyIndexBufferBind(const GrGLIndexBuffer* buffer);
223 void notifyIndexBufferDelete(const GrGLIndexBuffer* buffer);
reed@google.comac10a2d2010-12-22 21:39:39 +0000224 void notifyTextureDelete(GrGLTexture* texture);
225 void notifyRenderTargetDelete(GrRenderTarget* renderTarget);
bsalomon@google.com5782d712011-01-21 21:03:59 +0000226
bsalomon@google.com8531c1c2011-01-13 19:52:45 +0000227 void setSpareTextureUnit();
reed@google.comac10a2d2010-12-22 21:39:39 +0000228
bsalomon@google.com8295dc12011-05-02 12:53:34 +0000229 // bound is region that may be modified and therefore has to be resolved.
230 // NULL means whole target. Can be an empty rect.
231 void flushRenderTarget(const GrIRect* bound);
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000232 void flushStencil(DrawType);
233 void flushAAState(DrawType);
bsalomon@google.com0650e812011-04-08 18:07:53 +0000234
bsalomon@google.com280e99f2012-01-05 16:17:38 +0000235 bool configToGLFormats(GrPixelConfig config,
236 bool getSizedInternal,
237 GrGLenum* internalFormat,
238 GrGLenum* externalFormat,
239 GrGLenum* externalType);
bsalomon@google.com6f379512011-11-16 20:36:03 +0000240 // helper for onCreateTexture and writeTexturePixels
bsalomon@google.com136f55b2011-11-28 18:34:44 +0000241 bool uploadTexData(const GrGLTexture::Desc& desc,
bsalomon@google.com1e0e6072011-11-28 18:49:37 +0000242 bool isNewTexture,
bsalomon@google.com6f379512011-11-16 20:36:03 +0000243 int left, int top, int width, int height,
244 GrPixelConfig dataConfig,
245 const void* data,
246 size_t rowBytes);
bsalomon@google.com0650e812011-04-08 18:07:53 +0000247
bsalomon@google.com81c3f8d2011-08-03 15:18:33 +0000248 bool createRenderTargetObjects(int width, int height,
249 GrGLuint texID,
250 GrGLRenderTarget::Desc* desc);
251
robertphillips@google.com99a5ac02012-04-10 19:26:38 +0000252 void fillInConfigRenderableTable();
253
reed@google.comac10a2d2010-12-22 21:39:39 +0000254 friend class GrGLVertexBuffer;
255 friend class GrGLIndexBuffer;
256 friend class GrGLTexture;
257 friend class GrGLRenderTarget;
258
bsalomon@google.com89ec61e2012-02-10 20:05:18 +0000259 GrGLContextInfo fGLContextInfo;
bsalomon@google.com2c17fcd2011-07-06 17:47:02 +0000260
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000261 // GL program-related state
262 ProgramCache* fProgramCache;
bsalomon@google.com9ba4fa62012-07-16 17:36:28 +0000263 SkAutoTUnref<GrGLProgram> fCurrentProgram;
bsalomon@google.com49209392012-06-05 15:13:46 +0000264
265 ///////////////////////////////////////////////////////////////////////////
266 ///@name Caching of GL State
267 ///@{
268 int fHWActiveTextureUnitIdx;
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000269 GrGLuint fHWProgramID;
270 GrColor fHWConstAttribColor;
271 GrColor fHWConstAttribCoverage;
bsalomon@google.com5739d2c2012-05-31 15:07:19 +0000272
bsalomon@google.com49209392012-06-05 15:13:46 +0000273 enum TriState {
274 kNo_TriState,
275 kYes_TriState,
276 kUnknown_TriState
277 };
278
bsalomon@google.coma3201942012-06-21 19:58:20 +0000279 // last scissor / viewport scissor state seen by the GL.
280 struct {
281 TriState fEnabled;
282 GrGLIRect fRect;
283 void invalidate() {
284 fEnabled = kUnknown_TriState;
285 fRect.invalidate();
286 }
287 } fHWScissorSettings;
288
289 GrGLIRect fHWViewport;
290
bsalomon@google.com49209392012-06-05 15:13:46 +0000291 struct {
292 size_t fVertexOffset;
293 GrVertexLayout fVertexLayout;
294 const GrVertexBuffer* fVertexBuffer;
295 const GrIndexBuffer* fIndexBuffer;
296 bool fArrayPtrsDirty;
297 } fHWGeometryState;
bsalomon@google.com5782d712011-01-21 21:03:59 +0000298
bsalomon@google.coma4d8fc22012-05-21 13:21:46 +0000299 struct {
300 GrBlendCoeff fSrcCoeff;
301 GrBlendCoeff fDstCoeff;
302 GrColor fConstColor;
303 bool fConstColorValid;
304 TriState fEnabled;
305
306 void invalidate() {
bsalomon@google.com47059542012-06-06 20:51:20 +0000307 fSrcCoeff = kInvalid_GrBlendCoeff;
308 fDstCoeff = kInvalid_GrBlendCoeff;
bsalomon@google.coma4d8fc22012-05-21 13:21:46 +0000309 fConstColorValid = false;
310 fEnabled = kUnknown_TriState;
311 }
312 } fHWBlendState;
313
bsalomon@google.com4d5f3fe2012-05-21 17:11:44 +0000314 struct {
315 TriState fMSAAEnabled;
316 TriState fSmoothLineEnabled;
317 void invalidate() {
318 fMSAAEnabled = kUnknown_TriState;
319 fSmoothLineEnabled = kUnknown_TriState;
320 }
321 } fHWAAState;
322
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000323 struct {
senorblanco@chromium.org3cb406b2013-02-05 19:50:46 +0000324 SkMatrix fViewMatrix;
325 SkISize fRTSize;
326 GrSurfaceOrigin fLastOrigin;
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000327 void invalidate() {
bsalomon@google.comb9086a02012-11-01 18:02:54 +0000328 fViewMatrix = SkMatrix::InvalidMatrix();
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000329 fRTSize.fWidth = -1; // just make the first value compared illegal.
senorblanco@chromium.org3cb406b2013-02-05 19:50:46 +0000330 fLastOrigin = (GrSurfaceOrigin) -1;
bsalomon@google.comded4f4b2012-06-28 18:48:06 +0000331 }
332 } fHWPathMatrixState;
333
bsalomon@google.coma3201942012-06-21 19:58:20 +0000334 GrStencilSettings fHWStencilSettings;
335 TriState fHWStencilTestEnabled;
bsalomon@google.com457b8a32012-05-21 21:19:58 +0000336
bsalomon@google.comc811ea32012-05-21 15:33:09 +0000337 GrDrawState::DrawFace fHWDrawFace;
338 TriState fHWWriteToColor;
339 TriState fHWDitherEnabled;
340 GrRenderTarget* fHWBoundRenderTarget;
341 GrTexture* fHWBoundTextures[GrDrawState::kNumStages];
bsalomon@google.com49209392012-06-05 15:13:46 +0000342 ///@}
bsalomon@google.com978c8c62012-05-21 14:45:49 +0000343
bsalomon@google.comfe676522011-06-17 18:12:21 +0000344 // we record what stencil format worked last time to hopefully exit early
345 // from our loop that tries stencil formats and calls check fb status.
346 int fLastSuccessfulStencilFmtIdx;
347
bsalomon@google.com18c9c192011-09-22 21:01:31 +0000348 bool fPrintedCaps;
349
reed@google.comac10a2d2010-12-22 21:39:39 +0000350 typedef GrGpu INHERITED;
351};
352
bsalomon@google.coma7f84e12011-03-10 14:13:19 +0000353#endif