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

Unified Diff: src/gpu/text/GrAtlasTextBlob.h

Issue 1698503002: Remove last bit of privacy violation for GrAtlasTextBlob (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase + nits Created 4 years, 10 months 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 | « src/gpu/batches/GrAtlasTextBatch.cpp ('k') | src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/text/GrAtlasTextBlob.h
diff --git a/src/gpu/text/GrAtlasTextBlob.h b/src/gpu/text/GrAtlasTextBlob.h
index b4168e921ebf98ae691c7e991f850f8b06c805be..63eb56b6f8e53ea4fd57cbd3c490d3b7094a3f94 100644
--- a/src/gpu/text/GrAtlasTextBlob.h
+++ b/src/gpu/text/GrAtlasTextBlob.h
@@ -17,6 +17,7 @@
#include "SkSurfaceProps.h"
#include "SkTInternalLList.h"
+class GrBlobRegenHelper;
struct GrDistanceFieldAdjustTable;
class GrMemoryPool;
class GrTextContext;
@@ -108,6 +109,8 @@ public:
void setHasDistanceField() { fTextType |= kHasDistanceField_TextType; }
void setHasBitmap() { fTextType |= kHasBitmap_TextType; }
+ int runCount() const { return fRunCount; }
+
void push_back_run(int currRun) {
SkASSERT(currRun < fRunCount);
if (currRun > 0) {
@@ -255,6 +258,13 @@ public:
this->setupViewMatrix(viewMatrix, x, y);
}
+ void regenInBatch(GrDrawBatch::Target* target, GrBatchFontCache* fontCache,
+ GrBlobRegenHelper *helper, int run, int subRun, SkGlyphCache** cache,
+ SkTypeface** typeface, GrFontScaler** scaler,
+ const SkDescriptor** desc, size_t vertexStride,
+ GrColor color, SkScalar transX, SkScalar transY,
+ void** vertices, size_t* byteCount, int* glyphCount);
+
const Key& key() const { return fKey; }
~GrAtlasTextBlob() {
@@ -453,6 +463,17 @@ private:
bool fDrawAsPaths;
};
+ template <bool regenPos, bool regenCol, bool regenTexCoords, bool regenGlyphs>
+ void regenInBatch(GrDrawBatch::Target* target,
+ GrBatchFontCache* fontCache,
+ GrBlobRegenHelper* helper,
+ Run* run, Run::SubRunInfo* info, SkGlyphCache** cache,
+ SkTypeface** typeface, GrFontScaler** scaler,
+ const SkDescriptor** desc,
+ int glyphCount, size_t vertexStride,
+ GrColor color, SkScalar transX,
+ SkScalar transY) const;
+
inline GrDrawBatch* createBatch(const Run::SubRunInfo& info,
int glyphCount, int run, int subRun,
GrColor color, SkScalar transX, SkScalar transY,
@@ -510,8 +531,6 @@ private:
SkScalar fMinMaxScale;
int fRunCount;
uint8_t fTextType;
-
- friend class GrAtlasTextBatch; // We might be able to get rid of this friending
};
#endif
« no previous file with comments | « src/gpu/batches/GrAtlasTextBatch.cpp ('k') | src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698