Skip to content

Commit

Permalink
Bump up limits on the GrResourceCache used for the main GrContext. (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmaygarde authored Feb 8, 2017
1 parent d49a6b1 commit 0904cf3
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions shell/gpu/gpu_surface_gl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down Expand Up @@ -57,8 +56,7 @@ bool GPUSurfaceGL::Setup() {
return false;
}

context_->setResourceCacheLimits(kMaxGaneshResourceCacheCount,
kMaxGaneshResourceCacheBytes);
context_->setResourceCacheLimits(kGrCacheMaxCount, kGrCacheMaxByteSize);

delegate_->GLContextClearCurrent();

Expand Down

0 comments on commit 0904cf3

Please sign in to comment.