Remove init function from GrTextContext.h
BUG=skia: Review URL: https://codereview.chromium.org/1231923002
This commit is contained in:
parent
828877d726
commit
9df4659523
@ -255,7 +255,15 @@ void GrStencilAndCoverTextContext::init(GrRenderTarget* rt,
|
||||
RenderMode renderMode,
|
||||
const SkMatrix& viewMatrix,
|
||||
const SkIRect& regionClipBounds) {
|
||||
GrTextContext::init(rt, clip, paint, skPaint, regionClipBounds);
|
||||
fClip = clip;
|
||||
|
||||
fRenderTarget.reset(SkRef(rt));
|
||||
|
||||
fRegionClipBounds = regionClipBounds;
|
||||
fClip.getConservativeBounds(fRenderTarget->width(), fRenderTarget->height(), &fClipRect);
|
||||
|
||||
fPaint = paint;
|
||||
fSkPaint = skPaint;
|
||||
|
||||
fContextInitialMatrix = viewMatrix;
|
||||
fViewMatrix = viewMatrix;
|
||||
|
@ -68,6 +68,12 @@ private:
|
||||
SkMatrix fViewMatrix;
|
||||
SkMatrix fLocalMatrix;
|
||||
bool fUsingDeviceSpaceGlyphs;
|
||||
SkAutoTUnref<GrRenderTarget> fRenderTarget;
|
||||
GrClip fClip;
|
||||
SkIRect fClipRect;
|
||||
SkIRect fRegionClipBounds;
|
||||
GrPaint fPaint;
|
||||
SkPaint fSkPaint;
|
||||
|
||||
GrStencilAndCoverTextContext(GrContext*, GrDrawContext*, const SkSurfaceProps&);
|
||||
|
||||
|
@ -32,19 +32,6 @@ GrTextContext::~GrTextContext() {
|
||||
SkDELETE(fFallbackTextContext);
|
||||
}
|
||||
|
||||
void GrTextContext::init(GrRenderTarget* rt, const GrClip& clip, const GrPaint& grPaint,
|
||||
const SkPaint& skPaint, const SkIRect& regionClipBounds) {
|
||||
fClip = clip;
|
||||
|
||||
fRenderTarget.reset(SkRef(rt));
|
||||
|
||||
fRegionClipBounds = regionClipBounds;
|
||||
fClip.getConservativeBounds(fRenderTarget->width(), fRenderTarget->height(), &fClipRect);
|
||||
|
||||
fPaint = grPaint;
|
||||
fSkPaint = skPaint;
|
||||
}
|
||||
|
||||
void GrTextContext::drawText(GrRenderTarget* rt, const GrClip& clip, const GrPaint& paint,
|
||||
const SkPaint& skPaint, const SkMatrix& viewMatrix,
|
||||
const char text[], size_t byteLength,
|
||||
@ -147,7 +134,7 @@ void GrTextContext::drawTextBlob(GrRenderTarget* rt,
|
||||
runPaint.setFlags(FilterTextFlags(fSurfaceProps, runPaint));
|
||||
|
||||
GrPaint grPaint;
|
||||
if (!SkPaint2GrPaint(fContext, fRenderTarget, runPaint, viewMatrix, true, &grPaint)) {
|
||||
if (!SkPaint2GrPaint(fContext, rt, runPaint, viewMatrix, true, &grPaint)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -49,12 +49,6 @@ protected:
|
||||
SkSurfaceProps fSurfaceProps;
|
||||
|
||||
GrDrawContext* fDrawContext; // owning drawContext
|
||||
SkAutoTUnref<GrRenderTarget> fRenderTarget;
|
||||
GrClip fClip;
|
||||
SkIRect fClipRect;
|
||||
SkIRect fRegionClipBounds;
|
||||
GrPaint fPaint;
|
||||
SkPaint fSkPaint;
|
||||
|
||||
GrTextContext(GrContext*, GrDrawContext*, const SkSurfaceProps&);
|
||||
|
||||
@ -82,9 +76,6 @@ protected:
|
||||
const SkScalar pos[], int scalarsPerPosition,
|
||||
const SkPoint& offset, const SkIRect& clipBounds);
|
||||
|
||||
void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&,
|
||||
const SkIRect& regionClipBounds);
|
||||
|
||||
static GrFontScaler* GetGrFontScaler(SkGlyphCache* cache);
|
||||
// sets extent in stopVector and returns glyph count
|
||||
static int MeasureText(SkGlyphCache* cache, SkDrawCacheProc glyphCacheProc,
|
||||
|
Loading…
Reference in New Issue
Block a user