aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src/GrGpuGL.h
diff options
context:
space:
mode:
authorGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-05-19 17:11:07 +0000
committerGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-05-19 17:11:07 +0000
commitef3913bcbff265ff86116ae4f3dd2768dc42ccca (patch)
treea87a3c4db11f60650d7b9e018b8b28da34f27b47 /gpu/src/GrGpuGL.h
parent27661181d757145d98f2dc3e02b88ee3fffce9e5 (diff)
Batch up draws into triangle fans as large as possible when drawing convex
edge AA polys, so we minimize state changes and GL calls. This requires querying GL for the maximum number of fragment uniforms. It also makes the shader generator produce custom shaders for the number of relevant edges. This gives a ~5X speedup on the "Shapes" SampleApp. Review URL: http://codereview.appspot.com/4536070/ git-svn-id: http://skia.googlecode.com/svn/trunk@1380 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src/GrGpuGL.h')
-rw-r--r--gpu/src/GrGpuGL.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gpu/src/GrGpuGL.h b/gpu/src/GrGpuGL.h
index da955cfc56..d48d69eccb 100644
--- a/gpu/src/GrGpuGL.h
+++ b/gpu/src/GrGpuGL.h
@@ -107,6 +107,7 @@ protected:
virtual void flushScissor(const GrIRect* rect);
void clearStencil(uint32_t value, uint32_t mask);
virtual void clearStencilClip(const GrIRect& rect);
+ virtual int getMaxEdges() const;
// binds texture unit in GL
void setTextureUnit(int unitIdx);
@@ -189,6 +190,9 @@ private:
// Do we have stencil wrap ops.
bool fHasStencilWrap;
+ // The maximum number of fragment uniform vectors (GLES has min. 16).
+ int fMaxFragmentUniformVectors;
+
// ES requires an extension to support RGBA8 in RenderBufferStorage
bool fRGBA8Renderbuffer;