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/GrResourceProvider.h b/src/gpu/GrResourceProvider.h
index 46b4710..1ac19ec 100644
--- a/src/gpu/GrResourceProvider.h
+++ b/src/gpu/GrResourceProvider.h
@@ -253,6 +253,8 @@
const GrCaps* caps() const { return fCaps.get(); }
bool overBudget() const { return fCache->overBudget(); }
+ static uint32_t MakeApprox(uint32_t value);
+
inline GrResourceProviderPriv priv();
inline const GrResourceProviderPriv priv() const;