aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTexturePriv.h
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-05-18 18:13:40 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-18 18:13:48 +0000
commit4b30a96a3e96b7f051e25025f4f17f3c54e04153 (patch)
tree72e0561a19df0db0ca111ee58e4730b2068adb28 /src/gpu/GrTexturePriv.h
parent14d54c207d7a175d14d34f5527af7cbfd579f4d5 (diff)
Revert "Remove GrSurfaceDesc member from GrSurface."
This reverts commit 84911546b9535a2fff6c5e07f588f175d5a04f45. Reason for revert: Breaking bots possibly? Original change's description: > Remove GrSurfaceDesc member from GrSurface. > > Change-Id: I0fe979994e1e3fc457b952dfb5e0090c45fad771 > Reviewed-on: https://skia-review.googlesource.com/17273 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I404e509fcd3e3d5527b3bc6e286b7d436c12e879 Reviewed-on: https://skia-review.googlesource.com/17364 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrTexturePriv.h')
-rw-r--r--src/gpu/GrTexturePriv.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gpu/GrTexturePriv.h b/src/gpu/GrTexturePriv.h
index 67631fc2c4..042061129d 100644
--- a/src/gpu/GrTexturePriv.h
+++ b/src/gpu/GrTexturePriv.h
@@ -17,6 +17,18 @@
implemented privately in GrTexture with a inline public method here). */
class GrTexturePriv {
public:
+ void setFlag(GrSurfaceFlags flags) {
+ fTexture->fDesc.fFlags = fTexture->fDesc.fFlags | flags;
+ }
+
+ void resetFlag(GrSurfaceFlags flags) {
+ fTexture->fDesc.fFlags = fTexture->fDesc.fFlags & ~flags;
+ }
+
+ bool isSetFlag(GrSurfaceFlags flags) const {
+ return 0 != (fTexture->fDesc.fFlags & flags);
+ }
+
void dirtyMipMaps(bool mipMapsDirty) {
fTexture->dirtyMipMaps(mipMapsDirty);
}
@@ -58,10 +70,6 @@ public:
static void ComputeScratchKey(const GrSurfaceDesc&, GrScratchKey*);
private:
- static void ComputeScratchKey(GrPixelConfig config, int width, int height,
- GrSurfaceOrigin origin, bool isRenderTarget, int sampleCnt,
- bool isMipMapped, GrScratchKey* key);
-
GrTexturePriv(GrTexture* texture) : fTexture(texture) { }
GrTexturePriv(const GrTexturePriv& that) : fTexture(that.fTexture) { }
GrTexturePriv& operator=(const GrTexturePriv&); // unimpl