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

Unified Diff: src/gpu/GrTextUtils.h

Issue 1518883002: make internaldrawBmpText part of GrTextUtils (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanuptext10textutils
Patch Set: 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 | « src/gpu/GrTextContext.h ('k') | src/gpu/GrTextUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextUtils.h
diff --git a/src/gpu/GrTextUtils.h b/src/gpu/GrTextUtils.h
index cd2067f4645eea2a5e3b86756f1d4a272659cdfc..8f673afbed6c699524794ea169c7aeb60b823c3e 100644
--- a/src/gpu/GrTextUtils.h
+++ b/src/gpu/GrTextUtils.h
@@ -8,15 +8,22 @@
#ifndef GrTextUtils_DEFINED
#define GrTextUtils_DEFINED
+#include "GrColor.h"
#include "SkScalar.h"
+class GrAtlasTextBlob;
+class GrBatchFontCache;
+class GrBatchTextStrike;
class GrClip;
class GrContext;
class GrDrawContext;
+class GrFontScaler;
+class SkGlyph;
class SkMatrix;
struct SkIRect;
class SkPaint;
struct SkPoint;
+class SkGlyphCache;
class SkSurfaceProps;
/*
@@ -26,20 +33,38 @@ class SkSurfaceProps;
*/
class GrTextUtils {
public:
+ // Functions for appending BMP text to GrAtlasTextBlob
+ static void DrawBmpText(GrAtlasTextBlob*, int runIndex,
+ GrBatchFontCache*, SkGlyphCache*, const SkPaint&,
+ GrColor, const SkMatrix& viewMatrix,
+ const char text[], size_t byteLength,
+ SkScalar x, SkScalar y);
-static void DrawTextAsPath(GrContext*, GrDrawContext*, const GrClip& clip,
- const SkPaint& origPaint, const SkMatrix& viewMatrix,
- const char text[], size_t byteLength, SkScalar x, SkScalar y,
- const SkIRect& clipBounds);
-
-static void DrawPosTextAsPath(GrContext* context,
- GrDrawContext* dc,
- const SkSurfaceProps& props,
- const GrClip& clip,
- const SkPaint& origPaint, const SkMatrix& viewMatrix,
- const char text[], size_t byteLength,
- const SkScalar pos[], int scalarsPerPosition,
- const SkPoint& offset, const SkIRect& clipBounds);
+ static void DrawBmpPosText(GrAtlasTextBlob*, int runIndex,
+ GrBatchFontCache*, SkGlyphCache*, const SkPaint&,
+ GrColor, const SkMatrix& viewMatrix,
+ const char text[], size_t byteLength,
+ const SkScalar pos[], int scalarsPerPosition,
+ const SkPoint& offset);
+
+ // Functions for drawing text as paths
+ static void DrawTextAsPath(GrContext*, GrDrawContext*, const GrClip& clip,
+ const SkPaint& origPaint, const SkMatrix& viewMatrix,
+ const char text[], size_t byteLength, SkScalar x, SkScalar y,
+ const SkIRect& clipBounds);
+
+ static void DrawPosTextAsPath(GrContext* context,
+ GrDrawContext* dc,
+ const SkSurfaceProps& props,
+ const GrClip& clip,
+ const SkPaint& origPaint, const SkMatrix& viewMatrix,
+ const char text[], size_t byteLength,
+ const SkScalar pos[], int scalarsPerPosition,
+ const SkPoint& offset, const SkIRect& clipBounds);
+private:
+ static void BmpAppendGlyph(GrAtlasTextBlob*, int runIndex, GrBatchFontCache*,
+ GrBatchTextStrike**, const SkGlyph&, int left, int top,
+ GrColor color, GrFontScaler*);
};
#endif
« no previous file with comments | « src/gpu/GrTextContext.h ('k') | src/gpu/GrTextUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698