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

Unified Diff: include/gpu/GrTextureAccess.h

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: include/gpu/GrTextureAccess.h
diff --git a/include/gpu/GrTextureAccess.h b/include/gpu/GrTextureAccess.h
index 124a75aabc065da64c9360592fb5cfeaaf8ca994..ade92782200bcd6147bbfb0ba125eb2e8444a64c 100644
--- a/include/gpu/GrTextureAccess.h
+++ b/include/gpu/GrTextureAccess.h
@@ -29,20 +29,27 @@ public:
explicit GrTextureAccess(GrTexture*,
GrTextureParams::FilterMode = GrTextureParams::kNone_FilterMode,
- SkShader::TileMode tileXAndY = SkShader::kClamp_TileMode);
+ SkShader::TileMode tileXAndY = SkShader::kClamp_TileMode,
+ GrShaderFlags visibility = kFragment_GrShaderFlag);
- void reset(GrTexture*, const GrTextureParams&);
+ void reset(GrTexture*, const GrTextureParams&,
+ GrShaderFlags visibility = kFragment_GrShaderFlag);
void reset(GrTexture*,
GrTextureParams::FilterMode = GrTextureParams::kNone_FilterMode,
- SkShader::TileMode tileXAndY = SkShader::kClamp_TileMode);
+ SkShader::TileMode tileXAndY = SkShader::kClamp_TileMode,
+ GrShaderFlags visibility = kFragment_GrShaderFlag);
bool operator==(const GrTextureAccess& that) const {
- return this->getTexture() == that.getTexture() && fParams == that.fParams;
+ return this->getTexture() == that.getTexture() &&
+ fParams == that.fParams &&
+ fVisibility == that.fVisibility;
}
bool operator!=(const GrTextureAccess& other) const { return !(*this == other); }
GrTexture* getTexture() const { return fTexture.get(); }
+ GrSLType getSamplerType() const { return this->getTexture()->getSamplerType(); }
+ GrShaderFlags getVisibility() const { return fVisibility; }
/**
* For internal use by GrProcessor.
@@ -57,6 +64,7 @@ private:
ProgramTexture fTexture;
GrTextureParams fParams;
+ GrShaderFlags fVisibility;
typedef SkNoncopyable INHERITED;
};

Powered by Google App Engine
This is Rietveld 408576698