Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Unified Diff: src/gpu/gl/GrGLTexture.cpp

Issue 1782583002: Add support for vertex and geometry shader textures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGLTexture.cpp
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index e05006c46e986c914a720be71fc84b3c84acc3a3..a27140ed9e0d11d977f1a32485f78e8d7ddbbd12 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -64,6 +64,17 @@ void GrGLTexture::onAbandon() {
INHERITED::onAbandon();
}
+GrSLType GrGLTexture::getSamplerType() const {
+ if (GR_GL_TEXTURE_EXTERNAL == fInfo.fTarget) {
+ return kSamplerExternal_GrSLType;
+ } else if (GR_GL_TEXTURE_RECTANGLE == fInfo.fTarget) {
+ return kSampler2DRect_GrSLType;
+ } else {
+ SkASSERT(GR_GL_TEXTURE_2D == fInfo.fTarget);
+ return kSampler2D_GrSLType;
+ }
+}
+
GrBackendObject GrGLTexture::getTextureHandle() const {
#ifdef SK_IGNORE_GL_TEXTURE_TARGET
return static_cast<GrBackendObject>(this->textureID());

Powered by Google App Engine
This is Rietveld 408576698