aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrSurface.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/gpu/GrSurface.h b/include/gpu/GrSurface.h
index 4ddc5d14cc..f3771a74e2 100644
--- a/include/gpu/GrSurface.h
+++ b/include/gpu/GrSurface.h
@@ -71,11 +71,16 @@ protected:
return fSurfaceFlags & GrInternalSurfaceFlags::kDoesNotSupportMipMaps;
}
- void setIsClampOnly() {
+ void setIsGLTextureRectangleOrExternal() {
SkASSERT(this->asTexture());
- fSurfaceFlags |= GrInternalSurfaceFlags::kIsClampOnly;
+ 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;
}
- bool isClampOnly() const { return fSurfaceFlags & GrInternalSurfaceFlags::kIsClampOnly; }
void setHasMixedSamples() {
SkASSERT(this->asRenderTarget());