aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-02-28 16:37:34 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-28 16:37:47 +0000
commit5c56af1790f58e24d7e9a887c73637fee9b97b38 (patch)
tree2474d26d20cbe3671868b2740a4cd345c5217b6c /tools/gpu
parentdabef9dddd4f6a4d083b3a644dfd6d493b4649f0 (diff)
Revert "Fission GrAtlasGlyphCache in two"
This reverts commit acf17904d6286f2a63a5d895541804d0ea1be646. Reason for revert: Chrome Original change's description: > Fission GrAtlasGlyphCache in two > > This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager. > > The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager) > and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation > time and provides access to the proxies backing the atlases. The full GrAtlasManager is > only available at flush time and allows instantiation of the proxies and uploading to them. > > In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the > GrAtlasManager in the main thread. This future atlas manager will have had all of its > GrDrawOpAtlases created (but not instantiated) so there should be no race conditions. > > Change-Id: I9967d3a4116af50128f390c5039a712b8cd4db08 > Reviewed-on: https://skia-review.googlesource.com/108001 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I7c760ea1a9f041a310b96d552aa1497ee5902cd8 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/111040 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tools/gpu')
-rw-r--r--tools/gpu/GrTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index c483a22aac..c6d3bbe2ef 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -26,7 +26,7 @@
#include "SkMathPriv.h"
#include "SkString.h"
#include "ops/GrMeshDrawOp.h"
-#include "text/GrGlyphCache.h"
+#include "text/GrAtlasGlyphCache.h"
#include "text/GrTextBlobCache.h"
namespace GrTest {
@@ -94,7 +94,7 @@ void GrContext::setTextBlobCacheLimit_ForTesting(size_t bytes) {
}
void GrContext::setTextContextAtlasSizes_ForTesting(const GrDrawOpAtlasConfig* configs) {
- fFullAtlasManager->setAtlasSizes_ForTesting(configs);
+ fAtlasGlyphCache->setAtlasSizes_ForTesting(configs);
}
///////////////////////////////////////////////////////////////////////////////
@@ -147,11 +147,11 @@ void GrContext::printGpuStats() const {
SkDebugf("%s", out.c_str());
}
-sk_sp<SkImage> GrContext::getFontAtlasImage_ForTesting(GrMaskFormat format, unsigned int index) {
- auto restrictedAtlasManager = this->contextPriv().getRestrictedAtlasManager();
+sk_sp<SkImage> GrContext::getFontAtlasImage_ForTesting(GrMaskFormat format, uint32_t index) {
+ GrAtlasGlyphCache* cache = this->contextPriv().getAtlasGlyphCache();
unsigned int numProxies;
- const sk_sp<GrTextureProxy>* proxies = restrictedAtlasManager->getProxies(format, &numProxies);
+ const sk_sp<GrTextureProxy>* proxies = cache->getProxies(format, &numProxies);
if (index >= numProxies || !proxies[index]) {
return nullptr;
}