提交 0904cf3e 编写于 作者: C Chinmay Garde 提交者: GitHub

Bump up limits on the GrResourceCache used for the main GrContext. (#3394)

上级 d49a6b11
......@@ -14,13 +14,12 @@
namespace shell {
// The limit of the number of GPU resources we hold in the GrContext's
// GPU cache.
static const int kMaxGaneshResourceCacheCount = 2048;
// Default maximum number of budgeted resources in the cache.
static const int kGrCacheMaxCount = 8192;
// The limit of the bytes allocated toward GPU resources in the GrContext's
// GPU cache.
static const size_t kMaxGaneshResourceCacheBytes = 96 * 1024 * 1024;
// Default maximum number of bytes of GPU memory of budgeted resources in the
// cache.
static const size_t kGrCacheMaxByteSize = 512 * (1 << 20);
GPUSurfaceGL::GPUSurfaceGL(GPUSurfaceGLDelegate* delegate)
: delegate_(delegate), weak_factory_(this) {}
......@@ -57,8 +56,7 @@ bool GPUSurfaceGL::Setup() {
return false;
}
context_->setResourceCacheLimits(kMaxGaneshResourceCacheCount,
kMaxGaneshResourceCacheBytes);
context_->setResourceCacheLimits(kGrCacheMaxCount, kGrCacheMaxByteSize);
delegate_->GLContextClearCurrent();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册