OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "GrTest.h" | 9 #include "GrTest.h" |
10 | 10 |
11 #include "GrBatchAtlas.h" | 11 #include "GrBatchAtlas.h" |
12 #include "GrBatchFontCache.h" | |
13 #include "GrContextOptions.h" | 12 #include "GrContextOptions.h" |
14 #include "GrDrawContext.h" | 13 #include "GrDrawContext.h" |
15 #include "GrDrawingManager.h" | 14 #include "GrDrawingManager.h" |
16 #include "GrGpuResourceCacheAccess.h" | 15 #include "GrGpuResourceCacheAccess.h" |
17 #include "GrResourceCache.h" | 16 #include "GrResourceCache.h" |
18 #include "GrTextBlobCache.h" | |
19 | 17 |
20 #include "SkGpuDevice.h" | 18 #include "SkGpuDevice.h" |
21 #include "SkGrPriv.h" | 19 #include "SkGrPriv.h" |
22 #include "SkString.h" | 20 #include "SkString.h" |
23 | 21 |
| 22 #include "text/GrBatchFontCache.h" |
| 23 #include "text/GrTextBlobCache.h" |
| 24 |
24 namespace GrTest { | 25 namespace GrTest { |
25 void SetupAlwaysEvictAtlas(GrContext* context) { | 26 void SetupAlwaysEvictAtlas(GrContext* context) { |
26 // These sizes were selected because they allow each atlas to hold a single
plot and will thus | 27 // These sizes were selected because they allow each atlas to hold a single
plot and will thus |
27 // stress the atlas | 28 // stress the atlas |
28 int dim = GrBatchAtlas::kGlyphMaxDim; | 29 int dim = GrBatchAtlas::kGlyphMaxDim; |
29 GrBatchAtlasConfig configs[3]; | 30 GrBatchAtlasConfig configs[3]; |
30 configs[kA8_GrMaskFormat].fWidth = dim; | 31 configs[kA8_GrMaskFormat].fWidth = dim; |
31 configs[kA8_GrMaskFormat].fHeight = dim; | 32 configs[kA8_GrMaskFormat].fHeight = dim; |
32 configs[kA8_GrMaskFormat].fPlotWidth = dim; | 33 configs[kA8_GrMaskFormat].fPlotWidth = dim; |
33 configs[kA8_GrMaskFormat].fPlotHeight = dim; | 34 configs[kA8_GrMaskFormat].fPlotHeight = dim; |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 SkASSERT(nullptr == fGpu); | 370 SkASSERT(nullptr == fGpu); |
370 fGpu = new MockGpu(this, options); | 371 fGpu = new MockGpu(this, options); |
371 SkASSERT(fGpu); | 372 SkASSERT(fGpu); |
372 this->initCommon(options); | 373 this->initCommon(options); |
373 | 374 |
374 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of | 375 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of |
375 // these objects are required for any of tests that use this context. TODO:
make stop allocating | 376 // these objects are required for any of tests that use this context. TODO:
make stop allocating |
376 // resources in the buffer pools. | 377 // resources in the buffer pools. |
377 fDrawingManager->abandon(); | 378 fDrawingManager->abandon(); |
378 } | 379 } |
OLD | NEW |