Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1053)

Unified Diff: src/gpu/GrAtlasTextContext.h

Issue 1512823004: Move DistanceAdjustTable to its own file (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanuptext7
Patch Set: tweaks Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextContext.h
diff --git a/src/gpu/GrAtlasTextContext.h b/src/gpu/GrAtlasTextContext.h
index 20f747ff15c22e8d91f3c7f31fbf1d8cd80d7e47..82283bcf2413e0ed7b18ab29fb8f76dccbba49cb 100644
--- a/src/gpu/GrAtlasTextContext.h
+++ b/src/gpu/GrAtlasTextContext.h
@@ -11,6 +11,7 @@
#include "GrTextContext.h"
#include "GrAtlasTextBlob.h"
+#include "GrDistanceFieldAdjustTable.h"
#include "GrGeometryProcessor.h"
#include "SkTextBlobRunIterator.h"
@@ -148,29 +149,9 @@ private:
const SkPoint& offset,
const SkIRect& regionClipBounds);
- // Distance field text needs this table to compute a value for use in the fragment shader.
- // Because the GrAtlasTextContext can go out of scope before the final flush, this needs to be
- // refcnted and malloced
- struct DistanceAdjustTable : public SkNVRefCnt<DistanceAdjustTable> {
- DistanceAdjustTable() { this->buildDistanceAdjustTable(); }
- ~DistanceAdjustTable() { delete[] fTable; }
-
- const SkScalar& operator[] (int i) const {
- return fTable[i];
- }
-
- private:
- void buildDistanceAdjustTable();
-
- SkScalar* fTable;
- };
-
GrBatchTextStrike* fCurrStrike;
GrTextBlobCache* fCache;
- SkAutoTUnref<const DistanceAdjustTable> fDistanceAdjustTable;
-
- friend class GrTextBlobCache;
- friend class GrAtlasTextBatch;
+ SkAutoTUnref<const GrDistanceFieldAdjustTable> fDistanceAdjustTable;
#ifdef GR_TEST_UTILS
DRAW_BATCH_TEST_FRIEND(TextBlobBatch);
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698