aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/GrTextureProxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/private/GrTextureProxy.h')
-rw-r--r--include/private/GrTextureProxy.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/private/GrTextureProxy.h b/include/private/GrTextureProxy.h
index fc7f1c54a7..8bbdbf2959 100644
--- a/include/private/GrTextureProxy.h
+++ b/include/private/GrTextureProxy.h
@@ -100,8 +100,18 @@ protected:
sk_sp<GrSurface> createSurface(GrResourceProvider*) const override;
+ void setDoesNotSupportMipMaps() {
+ fSurfaceFlags |= GrInternalSurfaceFlags::kDoesNotSupportMipMaps;
+ }
+ bool doesNotSupportMipMaps() const {
+ return fSurfaceFlags & GrInternalSurfaceFlags::kDoesNotSupportMipMaps;
+ }
+
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 isGLTextureRectangleOrExternal() const {
return fSurfaceFlags & GrInternalSurfaceFlags::kIsGLTextureRectangleOrExternal;