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

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

Issue 213123014: Revert of Implement text rendering with NVPR (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 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/GrContext.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.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 2014 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 GrStencilAndCoverTextContext_DEFINED
9 #define GrStencilAndCoverTextContext_DEFINED
10
11 #include "GrTextContext.h"
12 #include "GrDrawState.h"
13 #include "SkStrokeRec.h"
14
15 class GrTextStrike;
16 class GrPath;
17
18 /*
19 * This class implements text rendering using stencil and cover path rendering
20 * (by the means of GrDrawTarget::drawPath).
21 * This class exposes the functionality through GrTextContext interface.
22 */
23 class GrStencilAndCoverTextContext : public GrTextContext {
24 public:
25 GrStencilAndCoverTextContext(GrContext*, const SkDeviceProperties&);
26 virtual ~GrStencilAndCoverTextContext();
27
28 virtual void drawText(const GrPaint&, const SkPaint&, const char text[],
29 size_t byteLength,
30 SkScalar x, SkScalar y) SK_OVERRIDE;
31 virtual void drawPosText(const GrPaint&, const SkPaint&,
32 const char text[], size_t byteLength,
33 const SkScalar pos[], SkScalar constY,
34 int scalarsPerPosition) SK_OVERRIDE;
35
36 virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE;
37
38 private:
39 void init(const GrPaint&, const SkPaint&, size_t textByteLength);
40 void appendGlyph(GrGlyph::PackedID, const SkPoint&,
41 GrTextStrike*, GrFontScaler*);
42 void finish();
43
44 GrDrawState::AutoRestoreEffects fStateRestore;
45 SkScalar fTextRatio;
46 SkStrokeRec fStroke;
47 SkTDArray<const GrPath*> fPaths;
48 SkTDArray<SkMatrix> fTransforms;
49 SkPath fTmpPath;
50 };
51
52 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698