diff options
author | 2015-12-03 12:58:06 -0800 | |
---|---|---|
committer | 2015-12-03 12:58:06 -0800 | |
commit | 6dea83f244cfdea52901eef6b31cee60b07a8ea0 (patch) | |
tree | 2fde780eafe3efe1981fd8ede81d0d2c6ffe5dd3 /src/gpu/gl/GrGLGpu.h | |
parent | 6f2753deee7b8cd03224e3df91dfea21bbeb9f7f (diff) |
Add option to draw wireframe batch bounds
Committed: https://skia.googlesource.com/skia/+/26489ef21ff5df33b8cb5943fddfd4604e203960
Review URL: https://codereview.chromium.org/1494473005
Diffstat (limited to 'src/gpu/gl/GrGLGpu.h')
-rw-r--r-- | src/gpu/gl/GrGLGpu.h | 11 |
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; |