aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpuGL.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-02-07 16:06:47 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-02-07 16:06:47 +0000
commit4bcb0c6e0377557d326344f4bd2bbab4e8b1bc3a (patch)
treef7b198199b11281b93b635e905fb0c0aa3776f39 /src/gpu/GrGpuGL.h
parent0439e569969d560e1c6d1716c8cb3d29b82305f9 (diff)
Reland 3144 with assertion fix.
git-svn-id: http://skia.googlecode.com/svn/trunk@3146 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrGpuGL.h')
-rw-r--r--src/gpu/GrGpuGL.h40
1 files changed, 37 insertions, 3 deletions
diff --git a/src/gpu/GrGpuGL.h b/src/gpu/GrGpuGL.h
index 6ac48090c1..e11143289f 100644
--- a/src/gpu/GrGpuGL.h
+++ b/src/gpu/GrGpuGL.h
@@ -61,8 +61,41 @@ protected:
, fPackFlipYSupport(false)
, fTextureUsageSupport(false)
, fTexStorageSupport(false) {
+ memset(&fVerifiedColorAttachmentConfigs, 0,
+ sizeof(fVerifiedColorAttachmentConfigs));
}
- SkTArray<GrGLStencilBuffer::Format, true> fStencilFormats;
+
+ // Call to note that a color config has been verified as a valid
+ // color attachment. This may save future calls to
+ // CheckFramebufferStatus
+ void markConfigAsValidColorAttachment(GrPixelConfig config);
+
+ // Call to check whether a config has been verified as a valid color
+ // attachment.
+ bool isConfigVerifiedColorAttachment(GrPixelConfig config) const;
+
+ // Call to note that a color config / stencil format pair passed
+ // FBO status check. We may skip calling CheckFramebufferStatus for
+ // this combination in the future.
+ void markColorConfigAndStencilFormatAsVerified(
+ GrPixelConfig config,
+ const GrGLStencilBuffer::Format& format);
+
+ // Call to check whether color config / stencil format pair has already
+ // passed FBO status check.
+ bool isColorConfigAndStencilFormatVerified(
+ GrPixelConfig config,
+ const GrGLStencilBuffer::Format& format) const;
+
+ void print() const;
+
+ struct StencilFormat {
+ GrGLStencilBuffer::Format fFormat;
+ uint32_t fVerifiedColorConfigs[(kGrPixelConfigCount + 31) / 32];
+ };
+
+ SkTArray<StencilFormat, true> fStencilFormats;
+
enum {
/**
@@ -118,9 +151,10 @@ protected:
// Is there support for glTexStorage
bool fTexStorageSupport;
- void print() const;
+ private:
+ uint32_t fVerifiedColorAttachmentConfigs[(kGrPixelConfigCount + 31) / 32];
} fGLCaps;
-
+
struct {
size_t fVertexOffset;
GrVertexLayout fVertexLayout;