summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/skia/include/gpu/GrTextContext.h
blob: b367cf228d57fd5c0103cbb77332bc7b7a0dd4ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * Copyright 2010 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef GrTextContext_DEFINED
#define GrTextContext_DEFINED

#include "GrContext.h"
#include "GrGlyph.h"
#include "GrPaint.h"

class GrContext;
class GrDrawTarget;
class GrFontScaler;

/*
 * This class wraps the state for a single text render
 */
class GrTextContext {
public:
    virtual void drawPackedGlyph(GrGlyph::PackedID, GrFixed left, GrFixed top,
                                 GrFontScaler*) = 0;

protected:
    GrTextContext(GrContext*, const GrPaint&);
    virtual ~GrTextContext() {}

    GrPaint                fPaint;
    GrContext*             fContext;
    GrDrawTarget*          fDrawTarget;

    SkIRect                fClipRect;

private:
};

#endif