skia2/include/gpu/GrTextContext.h
commit-bot@chromium.org fd03d4a829 Replace all instances of GrRect with SkRect.
And remove the typedef in GrRect.h. The same with GrIRect.

R=robertphillips@google.com

Author: tfarina@chromium.org

Review URL: https://chromiumcodereview.appspot.com/19449002

git-svn-id: http://skia.googlecode.com/svn/trunk@10130 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-17 21:39:42 +00:00

58 lines
1.3 KiB
C++

/*
* 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 GrTextStrike;
class GrFontScaler;
class GrDrawTarget;
class GrTextContext {
public:
GrTextContext(GrContext*, const GrPaint&);
~GrTextContext();
void drawPackedGlyph(GrGlyph::PackedID, GrFixed left, GrFixed top,
GrFontScaler*);
void flush(); // optional; automatically called by destructor
private:
GrPaint fPaint;
GrContext* fContext;
GrDrawTarget* fDrawTarget;
GrFontScaler* fScaler;
GrTextStrike* fStrike;
inline void flushGlyphs();
void setupDrawTarget();
enum {
kMinRequestedGlyphs = 1,
kDefaultRequestedGlyphs = 64,
kMinRequestedVerts = kMinRequestedGlyphs * 4,
kDefaultRequestedVerts = kDefaultRequestedGlyphs * 4,
};
SkPoint* fVertices;
int32_t fMaxVertices;
GrTexture* fCurrTexture;
int fCurrVertex;
SkIRect fClipRect;
GrContext::AutoMatrix fAutoMatrix;
};
#endif