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

Side by Side Diff: include/gpu/GrBitmapTextContext.h

Issue 27199002: Split out GrBitmapTextContext from GrTextContext. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rebase to ToT Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 /*
2 * Copyright 2013 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 GrBitmapTextContext_DEFINED
9 #define GrBitmapTextContext_DEFINED
10
11 #include "GrTextContext.h"
12
13 class GrTextStrike;
14
15 /*
16 * This class implements GrTextContext using standard bitmap fonts
17 */
18 class GrBitmapTextContext : public GrTextContext {
19 public:
20 GrBitmapTextContext(GrContext*, const GrPaint&);
21 virtual ~GrBitmapTextContext();
22
23 virtual void drawPackedGlyph(GrGlyph::PackedID, GrFixed left, GrFixed top,
24 GrFontScaler*) SK_OVERRIDE;
25
26 virtual void flush() SK_OVERRIDE; // optional
27
28 private:
29 GrTextStrike* fStrike;
30
31 void flushGlyphs(); // automatically called by destructor
32
33 enum {
34 kMinRequestedGlyphs = 1,
35 kDefaultRequestedGlyphs = 64,
36 kMinRequestedVerts = kMinRequestedGlyphs * 4,
37 kDefaultRequestedVerts = kDefaultRequestedGlyphs * 4,
38 };
39
40 SkPoint* fVertices;
41 int32_t fMaxVertices;
42 GrTexture* fCurrTexture;
43 int fCurrVertex;
44 };
45
46 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/GrTextContext.h » ('j') | include/gpu/GrTextContext.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698