diff options
author | Brian Salomon <bsalomon@google.com> | 2016-11-29 11:59:17 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-29 17:42:53 +0000 |
commit | f9f451213a3951d8a61568998de2ddbd643f6693 (patch) | |
tree | ba11ab458cbe8c654337bc704c52f4ca73f6b44a /src/gpu/glsl/GrGLSLShaderBuilder.h | |
parent | e18c97b73a0392b2eee57a111122dd5b637e36e6 (diff) |
Reland image storage with fixes.
Revert "Revert "Initial OpenGL Image support.""
This reverts commit 59dc41175d99d0a31c046aec0c26c4d82a3a3574.
BUG=skia:
Change-Id: Ibe3c87ce7f746f065fdbcc5a518388cc291112f5
Reviewed-on: https://skia-review.googlesource.com/5131
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/glsl/GrGLSLShaderBuilder.h')
-rw-r--r-- | src/gpu/glsl/GrGLSLShaderBuilder.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.h b/src/gpu/glsl/GrGLSLShaderBuilder.h index b568369cca..983d50b926 100644 --- a/src/gpu/glsl/GrGLSLShaderBuilder.h +++ b/src/gpu/glsl/GrGLSLShaderBuilder.h @@ -25,7 +25,8 @@ public: GrGLSLShaderBuilder(GrGLSLProgramBuilder* program); virtual ~GrGLSLShaderBuilder() {} - typedef GrGLSLUniformHandler::SamplerHandle SamplerHandle; + using SamplerHandle = GrGLSLUniformHandler::SamplerHandle; + using ImageStorageHandle = GrGLSLUniformHandler::ImageStorageHandle; /** Appends a 2D texture sample with projection if necessary. coordType must either be Vec2f or Vec3f. The latter is interpreted as projective texture coords. The vec length and swizzle @@ -72,6 +73,11 @@ public: /** Version of above that appends the result to the shader code instead.*/ void appendTexelFetch(SamplerHandle, const char* coordExpr); + /** Creates a string of shader code that performs an image load. */ + void appendImageStorageLoad(SkString* out, ImageStorageHandle, const char* coordExpr); + /** Version of above that appends the result to the shader code instead. */ + void appendImageStorageLoad(ImageStorageHandle, const char* coordExpr); + /** * Adds a constant declaration to the top of the shader. */ |