aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrContext.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-11-06 10:36:57 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-06 16:06:09 +0000
commit9f545bc18a1fdff64d40104028c6d8449e660a6e (patch)
tree3f2b5eb9124f53d4fd9610445ceb5d374ae7d424 /src/gpu/GrContext.cpp
parent97f0bc6a1a0d14fd7b9041c39449966535f9f431 (diff)
Modify fontcache GM to actually spill atlas.
Adds an option to GrDrawOpAtlas to disable multitexturing. Adds option to GrContextOptions to disable multitexturing for glyph atlases. Change-Id: If413ab7061538fa0e75628d252be4fd14215b6ba Reviewed-on: https://skia-review.googlesource.com/67802 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r--src/gpu/GrContext.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 2146858f79..d3194be8f2 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -204,7 +204,14 @@ bool GrContext::init(const GrContextOptions& options) {
}
fDrawingManager.reset(new GrDrawingManager(this, prcOptions, &fSingleOwner));
- fAtlasGlyphCache = new GrAtlasGlyphCache(this, options.fGlyphCacheTextureMaximumBytes);
+ GrDrawOpAtlas::AllowMultitexturing allowMultitexturing;
+ if (options.fAllowMultipleGlyphCacheTextures == GrContextOptions::Enable::kNo) {
+ allowMultitexturing = GrDrawOpAtlas::AllowMultitexturing::kNo;
+ } else {
+ allowMultitexturing = GrDrawOpAtlas::AllowMultitexturing::kYes;
+ }
+ fAtlasGlyphCache = new GrAtlasGlyphCache(this, options.fGlyphCacheTextureMaximumBytes,
+ allowMultitexturing);
this->contextPriv().addOnFlushCallbackObject(fAtlasGlyphCache);
fTextBlobCache.reset(new GrTextBlobCache(TextBlobCacheOverBudgetCB, this));