Add internal grsurface flag to track if using gl rectangle or external texture.
Bug: skia:
Change-Id: I84963833bbc3ae957c919a19f6e78fce2c9de7ef
Reviewed-on: https://skia-review.googlesource.com/125294
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/include/private/GrTextureProxy.h b/include/private/GrTextureProxy.h
index b9373a5..8bbdbf2 100644
--- a/include/private/GrTextureProxy.h
+++ b/include/private/GrTextureProxy.h
@@ -107,11 +107,15 @@
return fSurfaceFlags & GrInternalSurfaceFlags::kDoesNotSupportMipMaps;
}
- void setIsClampOnly() {
- fSurfaceFlags |= GrInternalSurfaceFlags::kIsClampOnly;
+ void setIsGLTextureRectangleOrExternal() {
+ fSurfaceFlags |= GrInternalSurfaceFlags::kIsGLTextureRectangleOrExternal;
+ // If we are a GL rectangle or external texture, it also means that we do not support
+ // generating mip maps.
+ this->setDoesNotSupportMipMaps();
}
- bool isClampOnly() const { return fSurfaceFlags & GrInternalSurfaceFlags::kIsClampOnly; }
-
+ bool isGLTextureRectangleOrExternal() const {
+ return fSurfaceFlags & GrInternalSurfaceFlags::kIsGLTextureRectangleOrExternal;
+ }
private:
GrMipMapped fMipMapped;