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 |