Bug 895036 - Lower the SkiaGL texture cache size r=gwright
authorJames Willcox <jwillcox@mozilla.com>
Tue, 09 Jul 2013 16:12:49 -0400
changeset 139190 ad853510b4d5ad26254efd2faa7a80112d69791b
parent 139189 b3d8eb2515762b43bf2d2e9b42df39ab4a87f474
child 139191 fbdfcb52c475b98af44d26ce282143682ddca132
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersgwright
bugs895036
milestone25.0a1
Bug 895036 - Lower the SkiaGL texture cache size r=gwright
gfx/2d/DrawTargetSkia.cpp
--- a/gfx/2d/DrawTargetSkia.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
@@ -654,16 +654,17 @@ DrawTargetSkia::InitWithGLContextAndGrGL
 
   mGrGLInterface = aGrGLInterface;
   mGrGLInterface->fCallbackData = reinterpret_cast<GrGLInterfaceCallbackData>(this);
 
   GrBackendContext backendContext = reinterpret_cast<GrBackendContext>(aGrGLInterface);
   SkAutoTUnref<GrContext> gr(GrContext::Create(kOpenGL_GrBackend, backendContext));
   mGrContext = gr.get();
 
+  mGrContext->setTextureCacheLimits(128, 1024*1024*16);
 
   GrBackendRenderTargetDesc targetDescriptor;
 
   targetDescriptor.fWidth = mSize.width;
   targetDescriptor.fHeight = mSize.height;
   targetDescriptor.fConfig = GfxFormatToGrConfig(mFormat);
   targetDescriptor.fOrigin = kBottomLeft_GrSurfaceOrigin;
   targetDescriptor.fSampleCnt = 0;