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

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

Issue 1685653004: Move surface props off of GrTextContext (Closed) Base URL: https://skia.googlesource.com/skia.git@tc-cleanup-3
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « src/gpu/text/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/text/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 12 matching lines...) Expand all
23 23
24 /* 24 /*
25 * This class wraps the state for a single text render 25 * This class wraps the state for a single text render
26 */ 26 */
27 class GrTextContext { 27 class GrTextContext {
28 public: 28 public:
29 virtual ~GrTextContext() {} 29 virtual ~GrTextContext() {}
30 30
31 virtual void drawText(GrDrawContext* dc, 31 virtual void drawText(GrDrawContext* dc,
32 const GrClip&, const GrPaint&, const SkPaint&, 32 const GrClip&, const GrPaint&, const SkPaint&,
33 const SkMatrix& viewMatrix, const char text[], size_t byteLength, 33 const SkMatrix& viewMatrix,
34 const SkSurfaceProps& props, const char text[], size_t byteLength,
34 SkScalar x, SkScalar y, const SkIRect& clipBounds) = 0 ; 35 SkScalar x, SkScalar y, const SkIRect& clipBounds) = 0 ;
35 virtual void drawPosText(GrDrawContext* dc, 36 virtual void drawPosText(GrDrawContext* dc,
36 const GrClip&, const GrPaint&, const SkPaint&, 37 const GrClip&, const GrPaint&, const SkPaint&,
37 const SkMatrix& viewMatrix, 38 const SkMatrix& viewMatrix,
39 const SkSurfaceProps& props,
38 const char text[], size_t byteLength, 40 const char text[], size_t byteLength,
39 const SkScalar pos[], int scalarsPerPosition, 41 const SkScalar pos[], int scalarsPerPosition,
40 const SkPoint& offset, const SkIRect& clipBounds) = 0; 42 const SkPoint& offset, const SkIRect& clipBounds) = 0;
41 virtual void drawTextBlob(GrDrawContext* dc, const GrClip&, const SkPaint&, 43 virtual void drawTextBlob(GrDrawContext* dc, const GrClip&,
42 const SkMatrix& viewMatrix, const SkTextBlob*, 44 const SkPaint&, const SkMatrix& viewMatrix,
45 const SkSurfaceProps& props, const SkTextBlob*,
43 SkScalar x, SkScalar y, 46 SkScalar x, SkScalar y,
44 SkDrawFilter*, const SkIRect& clipBounds) = 0; 47 SkDrawFilter*, const SkIRect& clipBounds) = 0;
45 48
46 static bool ShouldDisableLCD(const SkPaint& paint); 49 static bool ShouldDisableLCD(const SkPaint& paint);
47 50
48 protected: 51 protected:
49 GrContext* fContext; 52 GrContext* fContext;
50 SkSurfaceProps fSurfaceProps;
51 53
52 GrTextContext(GrContext*, const SkSurfaceProps&); 54 GrTextContext(GrContext*);
53 55
54 static GrFontScaler* GetGrFontScaler(SkGlyphCache* cache); 56 static GrFontScaler* GetGrFontScaler(SkGlyphCache* cache);
55 static uint32_t FilterTextFlags(const SkSurfaceProps& surfaceProps, const Sk Paint& paint); 57 static uint32_t FilterTextFlags(const SkSurfaceProps& surfaceProps, const Sk Paint& paint);
56 58
57 friend class GrAtlasTextBatch; 59 friend class GrAtlasTextBatch;
58 friend class GrAtlasTextBlob; // for FilterTextFlags 60 friend class GrAtlasTextBlob; // for FilterTextFlags
59 friend class GrTextUtils; // for some static functions 61 friend class GrTextUtils; // for some static functions
60 }; 62 };
61 63
62 #endif 64 #endif
OLDNEW
« no previous file with comments | « src/gpu/text/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/text/GrTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698