diff --git a/modules/canvaskit/gpu.js b/modules/canvaskit/gpu.js index 215440eb1e..5931bb0268 100644 --- a/modules/canvaskit/gpu.js +++ b/modules/canvaskit/gpu.js @@ -67,6 +67,10 @@ throw 'failed to create webgl context: err ' + ctx; } + // Bump the default resource cache limit. + var RESOURCE_CACHE_BYTES = 256 * 1024 * 1024; + ctx.setResourceCacheLimitBytes(RESOURCE_CACHE_BYTES); + if (!canvas && (!width || !height)) { throw 'height and width must be provided with context'; }