aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLGpu.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-12-03 12:58:06 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-03 12:58:06 -0800
commit6dea83f244cfdea52901eef6b31cee60b07a8ea0 (patch)
tree2fde780eafe3efe1981fd8ede81d0d2c6ffe5dd3 /src/gpu/gl/GrGLGpu.h
parent6f2753deee7b8cd03224e3df91dfea21bbeb9f7f (diff)
Add option to draw wireframe batch bounds
Diffstat (limited to 'src/gpu/gl/GrGLGpu.h')
-rw-r--r--src/gpu/gl/GrGLGpu.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index 6ec3881b89..d802f08b75 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -131,6 +131,8 @@ public:
void resetShaderCacheForTesting() const override;
+ void drawDebugWireRect(GrRenderTarget*, const SkIRect&, GrColor) override;
+
private:
GrGLGpu(GrGLContext* ctx, GrContext* context);
@@ -328,6 +330,8 @@ private:
SkAutoTUnref<GrGLContext> fGLContext;
void createCopyPrograms();
+ void createWireRectProgram();
+ void createUnitRectBuffer();
// GL program-related state
ProgramCache* fProgramCache;
@@ -505,6 +509,13 @@ private:
} fCopyPrograms[2];
GrGLuint fCopyProgramArrayBuffer;
+ struct {
+ GrGLuint fProgram;
+ GrGLint fColorUniform;
+ GrGLint fRectUniform;
+ } fWireRectProgram;
+ GrGLuint fWireRectArrayBuffer;
+
static int TextureTargetToCopyProgramIdx(GrGLenum target) {
if (target == GR_GL_TEXTURE_2D) {
return 0;