diff options
author | Robert Phillips <robertphillips@google.com> | 2018-03-07 11:54:37 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-07 19:25:10 +0000 |
commit | d2e9f767bbb1a7664e9ee83d0755d7e4327cb7b2 (patch) | |
tree | 48e23613d7bb6f3c57ec16bf447390a704be5598 /tools/gpu | |
parent | c7fbda95404a9422d0dd762d35383d5a61e89440 (diff) |
Revise Text & Small Path Atlas so instantiation failure is handled at flush time
This paves the way to having the AtlasTextOps not need the RestrictedAtlasManager at op creation time.
Change-Id: I1028faba730d50d3d3349a4c0809465d036ed611
Reviewed-on: https://skia-review.googlesource.com/111807
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tools/gpu')
-rw-r--r-- | tools/gpu/GrTest.cpp | 3 | ||||
-rw-r--r-- | tools/gpu/GrTest.h | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp index 3e9f73a6cb..aa2b07e232 100644 --- a/tools/gpu/GrTest.cpp +++ b/tools/gpu/GrTest.cpp @@ -31,10 +31,9 @@ namespace GrTest { -void SetupAlwaysEvictAtlas(GrContext* context) { +void SetupAlwaysEvictAtlas(GrContext* context, int dim) { // These sizes were selected because they allow each atlas to hold a single plot and will thus // stress the atlas - int dim = GrDrawOpAtlas::kGlyphMaxDim; GrDrawOpAtlasConfig configs[3]; configs[kA8_GrMaskFormat].fWidth = dim; configs[kA8_GrMaskFormat].fHeight = dim; diff --git a/tools/gpu/GrTest.h b/tools/gpu/GrTest.h index 5d988c7b04..6666ab1a20 100644 --- a/tools/gpu/GrTest.h +++ b/tools/gpu/GrTest.h @@ -10,13 +10,14 @@ #include "GrBackendSurface.h" #include "GrContext.h" +#include "GrDrawOpAtlas.h" namespace GrTest { /** * Forces the GrContext to use a small atlas which only has room for one plot and will thus * constantly be evicting entries */ - void SetupAlwaysEvictAtlas(GrContext*); + void SetupAlwaysEvictAtlas(GrContext*, int dim = GrDrawOpAtlas::kGlyphMaxDim); // TODO: remove this. It is only used in the SurfaceSemaphores Test. GrBackendTexture CreateBackendTexture(GrBackend, int width, int height, |