aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2016-07-07 08:49:11 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-07 08:49:11 -0700
commita7f29640f6ab4eb50962a9d9f12d01ac2ce8b471 (patch)
treeb2ab8bb78abede727cf680cfeca76e385bd7205b /include/gpu
parentd5f6e9a759891473b8211efb90f665b14a85b830 (diff)
Begin instanced rendering for simple shapes
Adds a module that performs instanced rendering and starts using it for a select subset of draws on Mac GL platforms. The instance processor can currently handle rects, ovals, round rects, and double round rects. It can generalize shapes as round rects in order to improve batching. The instance processor also employs new drawing algorithms, irrespective of instanced rendering, that improve GPU-side performance (e.g. sample mask, different triangle layouts, etc.). This change only scratches the surface of instanced rendering. The majority of draws still only have one instance. Future work may include: * Passing coord transforms through the texel buffer. * Sending FP uniforms through instanced vertex attribs. * Using instanced rendering for more draws (stencil writes, drawAtlas, etc.). * Adding more shapes to the instance processor’s repertoire. * Batching draws that have mismatched scissors (analyzing draw bounds, inserting clip planes, etc.). * Bindless textures. * Uber shaders. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2066993003 Committed: https://skia.googlesource.com/skia/+/42eafa4bc00354b132ad114d22ed6b95d8849891 Review-Url: https://codereview.chromium.org/2066993003
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrDrawContext.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h
index f56570b10b..96f42693b4 100644
--- a/include/gpu/GrDrawContext.h
+++ b/include/gpu/GrDrawContext.h
@@ -14,6 +14,7 @@
#include "SkRefCnt.h"
#include "SkRegion.h"
#include "SkSurfaceProps.h"
+#include "../private/GrInstancedPipelineInfo.h"
#include "../private/GrSingleOwner.h"
class GrAtlasTextContext;
@@ -346,6 +347,7 @@ private:
GrDrawTarget* fDrawTarget;
SkAutoTDelete<GrAtlasTextContext> fAtlasTextContext;
GrContext* fContext;
+ GrInstancedPipelineInfo fInstancedPipelineInfo;
SkSurfaceProps fSurfaceProps;
GrAuditTrail* fAuditTrail;