Revert r4287. Large numbers of textures created by random gradients can cause poor driver performance (at least on Mac)
BUG=670
git-svn-id: http://skia.googlecode.com/svn/trunk@4306 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 46b06d8..8c34c54 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1154,7 +1154,8 @@
// assumption here is that sw bitmap size is a good proxy for its size as
// a texture
size_t bmpSize = bitmap.getSize();
- size_t cacheSize = fContext->getTextureCacheBudget();
+ size_t cacheSize;
+ fContext->getTextureCacheLimits(NULL, &cacheSize);
if (bmpSize < cacheSize / 2) {
return false;
}