Alter approximate scratch texture binning after 1024
As the powers-of-2 get larger the coarse binning can burn a lot of VRAM.
Granted it isn't the best metric but, with this CL, the number of textures created and scratch textures reused remains unchanged when running the GMs.
Change-Id: I84abbbae0ed01aabb387671b5ee0e4fcdb82b671
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226226
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp
index a3761aa..34a2bd4 100644
--- a/src/gpu/GrTexture.cpp
+++ b/src/gpu/GrTexture.cpp
@@ -32,7 +32,7 @@
size_t GrTexture::onGpuMemorySize() const {
return GrSurface::ComputeSize(this->config(), this->width(), this->height(), 1,
- this->texturePriv().mipMapped(), false);
+ this->texturePriv().mipMapped());
}
/////////////////////////////////////////////////////////////////////////////