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

Side by Side Diff: src/gpu/GrTextContext.h

Issue 1514933002: Create GrTextUtils (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanuptext9
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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010 Google Inc. 2 * Copyright 2010 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrTextContext_DEFINED 8 #ifndef GrTextContext_DEFINED
9 #define GrTextContext_DEFINED 9 #define GrTextContext_DEFINED
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 const GrPaint&, const SkPaint&, 58 const GrPaint&, const SkPaint&,
59 const SkMatrix& viewMatrix, const char text[], size_ t byteLength, 59 const SkMatrix& viewMatrix, const char text[], size_ t byteLength,
60 SkScalar x, SkScalar y, const SkIRect& clipBounds) = 0; 60 SkScalar x, SkScalar y, const SkIRect& clipBounds) = 0;
61 virtual void onDrawPosText(GrDrawContext*, const GrClip&, 61 virtual void onDrawPosText(GrDrawContext*, const GrClip&,
62 const GrPaint&, const SkPaint&, 62 const GrPaint&, const SkPaint&,
63 const SkMatrix& viewMatrix, 63 const SkMatrix& viewMatrix,
64 const char text[], size_t byteLength, 64 const char text[], size_t byteLength,
65 const SkScalar pos[], int scalarsPerPosition, 65 const SkScalar pos[], int scalarsPerPosition,
66 const SkPoint& offset, const SkIRect& clipBounds) = 0; 66 const SkPoint& offset, const SkIRect& clipBounds) = 0;
67 67
68 void drawTextAsPath(GrDrawContext*, const GrClip& clip,
69 const SkPaint& origPaint, const SkMatrix& viewMatrix,
70 const char text[], size_t byteLength, SkScalar x, SkScal ar y,
71 const SkIRect& clipBounds);
72 void drawPosTextAsPath(GrDrawContext*, const GrClip& clip,
73 const SkPaint& origPaint, const SkMatrix& viewMatrix,
74 const char text[], size_t byteLength,
75 const SkScalar pos[], int scalarsPerPosition,
76 const SkPoint& offset, const SkIRect& clipBounds);
77
78 static GrFontScaler* GetGrFontScaler(SkGlyphCache* cache); 68 static GrFontScaler* GetGrFontScaler(SkGlyphCache* cache);
79 // sets extent in stopVector and returns glyph count
80 static int MeasureText(SkGlyphCache* cache, SkDrawCacheProc glyphCacheProc,
81 const char text[], size_t byteLength, SkVector* stopV ector);
82 static uint32_t FilterTextFlags(const SkSurfaceProps& surfaceProps, const Sk Paint& paint); 69 static uint32_t FilterTextFlags(const SkSurfaceProps& surfaceProps, const Sk Paint& paint);
83 70
84 friend class GrAtlasTextBatch; 71 friend class GrAtlasTextBatch;
85 friend class GrAtlasTextBlob; // for drawTextAsPath 72 friend class GrAtlasTextBlob; // for drawTextAsPath
86 }; 73 };
87 74
88 #endif 75 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698