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

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

Issue 1699073004: Delete GrTextContext (Closed) Base URL: https://skia.googlesource.com/skia.git@sever-the-cord
Patch Set: 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 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
(Empty)
1 /*
2 * Copyright 2010 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrTextContext_DEFINED
9 #define GrTextContext_DEFINED
10
11 #include "GrClip.h"
12 #include "GrGlyph.h"
13 #include "GrPaint.h"
14 #include "SkSurfaceProps.h"
15 #include "SkPostConfig.h"
16
17 class GrClip;
18 class GrContext;
19 class GrDrawContext;
20 class GrFontScaler;
21 class SkDrawFilter;
22 class SkTextBlob;
23
24 /*
25 * This class wraps the state for a single text render
26 */
27 class GrTextContext {
28 public:
29 virtual ~GrTextContext() {}
30
31 virtual void drawText(GrContext*, GrDrawContext* dc,
32 const GrClip&, const GrPaint&, const SkPaint&,
33 const SkMatrix& viewMatrix,
34 const SkSurfaceProps& props, const char text[], size_t byteLength,
35 SkScalar x, SkScalar y, const SkIRect& clipBounds) = 0 ;
36 virtual void drawPosText(GrContext*, GrDrawContext* dc,
37 const GrClip&, const GrPaint&, const SkPaint&,
38 const SkMatrix& viewMatrix,
39 const SkSurfaceProps& props,
40 const char text[], size_t byteLength,
41 const SkScalar pos[], int scalarsPerPosition,
42 const SkPoint& offset, const SkIRect& clipBounds) = 0;
43 virtual void drawTextBlob(GrContext*, GrDrawContext* dc, const GrClip&,
44 const SkPaint&, const SkMatrix& viewMatrix,
45 const SkSurfaceProps& props, const SkTextBlob*,
46 SkScalar x, SkScalar y,
47 SkDrawFilter*, const SkIRect& clipBounds) = 0;
48
49 static bool ShouldDisableLCD(const SkPaint& paint);
50
51 protected:
52 static GrFontScaler* GetGrFontScaler(SkGlyphCache* cache);
53 static uint32_t FilterTextFlags(const SkSurfaceProps& surfaceProps, const Sk Paint& paint);
54
55 friend class GrAtlasTextBatch;
56 friend class GrAtlasTextBlob; // for FilterTextFlags
57 friend class GrTextUtils; // for some static functions
58 };
59
60 #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