Chromium Code Reviews| Index: src/gpu/GrTest.cpp |
| diff --git a/src/gpu/GrTest.cpp b/src/gpu/GrTest.cpp |
| index a2efb4829beee513b07ff84a46dcdc655e16aa50..aeae2f6624f9640f8660999a9d5c6690f36062ec 100644 |
| --- a/src/gpu/GrTest.cpp |
| +++ b/src/gpu/GrTest.cpp |
| @@ -8,6 +8,7 @@ |
| #include "GrTest.h" |
| +#include "GrBatchAtlas.h" |
| #include "GrBatchFontCache.h" |
| #include "GrBufferedDrawTarget.h" |
| #include "GrContextOptions.h" |
| @@ -16,6 +17,28 @@ |
| #include "GrTextBlobCache.h" |
| #include "SkString.h" |
| +namespace GrTest { |
| +void SetupAlwaysEvictAtlas(GrContext* context) { |
| + GrBatchAtlasConfig configs[3]; |
| + configs[kA8_GrMaskFormat].fWidth = 256; |
|
bsalomon
2015/08/19 19:54:17
comments about why these numbers?
|
| + configs[kA8_GrMaskFormat].fHeight = 256; |
| + configs[kA8_GrMaskFormat].fPlotWidth = 256; |
| + configs[kA8_GrMaskFormat].fPlotHeight = 256; |
| + |
| + configs[kA565_GrMaskFormat].fWidth = 256; |
| + configs[kA565_GrMaskFormat].fHeight = 256; |
| + configs[kA565_GrMaskFormat].fPlotWidth = 256; |
| + configs[kA565_GrMaskFormat].fPlotHeight = 256; |
| + |
| + configs[kARGB_GrMaskFormat].fWidth = 256; |
| + configs[kARGB_GrMaskFormat].fHeight = 256; |
| + configs[kARGB_GrMaskFormat].fPlotWidth = 256; |
| + configs[kARGB_GrMaskFormat].fPlotHeight = 256; |
| + |
| + context->setTextContextAtlasSizes_ForTesting(configs); |
| +} |
| +}; |
| + |
| void GrTestTarget::init(GrContext* ctx, GrDrawTarget* target) { |
| SkASSERT(!fContext); |