f1d63aa80d
Reason for revert: Breaks Chrome. Need to fix template issue. Original issue's description: > Add factory class for generating various flavors of GrTextContext. > > This is the first pass of making Gr*TextContext more generic and easily > subclassed. The next stage will be making GrBitmapTextContext and > GrDistanceFieldTextContext more similar by moving the SkDraw loop into > each subclass. > > BUG=skia:2018 > > Committed: http://code.google.com/p/skia/source/detail?r=13142 R=bsalomon@google.com, reed@google.com TBR=bsalomon@google.com, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2018 Author: jvanverth@google.com Review URL: https://codereview.chromium.org/145023006 git-svn-id: http://skia.googlecode.com/svn/trunk@13143 2bbb7eff-a529-9590-31e7-b0007b416f81
41 lines
818 B
C++
41 lines
818 B
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 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
|