| Index: src/gpu/GrTest.cpp
|
| diff --git a/src/gpu/GrTest.cpp b/src/gpu/GrTest.cpp
|
| index a2efb4829beee513b07ff84a46dcdc655e16aa50..2b03238ab4f9a3384b460948b67b59de0851cf17 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,31 @@
|
| #include "GrTextBlobCache.h"
|
| #include "SkString.h"
|
|
|
| +namespace GrTest {
|
| +void SetupAlwaysEvictAtlas(GrContext* context) {
|
| + // These sizes were selected because they allow each atlas to hold a single plot and will thus
|
| + // stress the atlas
|
| + int dim = GrBatchAtlas::kGlyphMaxDim;
|
| + GrBatchAtlasConfig configs[3];
|
| + configs[kA8_GrMaskFormat].fWidth = dim;
|
| + configs[kA8_GrMaskFormat].fHeight = dim;
|
| + configs[kA8_GrMaskFormat].fPlotWidth = dim;
|
| + configs[kA8_GrMaskFormat].fPlotHeight = dim;
|
| +
|
| + configs[kA565_GrMaskFormat].fWidth = dim;
|
| + configs[kA565_GrMaskFormat].fHeight = dim;
|
| + configs[kA565_GrMaskFormat].fPlotWidth = dim;
|
| + configs[kA565_GrMaskFormat].fPlotHeight = dim;
|
| +
|
| + configs[kARGB_GrMaskFormat].fWidth = dim;
|
| + configs[kARGB_GrMaskFormat].fHeight = dim;
|
| + configs[kARGB_GrMaskFormat].fPlotWidth = dim;
|
| + configs[kARGB_GrMaskFormat].fPlotHeight = dim;
|
| +
|
| + context->setTextContextAtlasSizes_ForTesting(configs);
|
| +}
|
| +};
|
| +
|
| void GrTestTarget::init(GrContext* ctx, GrDrawTarget* target) {
|
| SkASSERT(!fContext);
|
|
|
|
|