From a3cbc28e8856fafc2329e793f8dcd6fee05e720c Mon Sep 17 00:00:00 2001 From: reed Date: Thu, 18 Dec 2014 08:13:03 -0800 Subject: [PATCH] remove dead code for SK_SUPPORT_LEGACY_TEXTRENDERMODE BUG=skia: TBR=robertphilips Review URL: https://codereview.chromium.org/812363002 --- include/core/SkSurface.h | 21 --------------------- src/image/SkSurface.cpp | 28 ---------------------------- 2 files changed, 49 deletions(-) diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h index 74c54e8d68..019bf216ce 100644 --- a/include/core/SkSurface.h +++ b/include/core/SkSurface.h @@ -109,27 +109,6 @@ public: return NewScratchRenderTarget(gr, info, 0, NULL); } -#ifdef SK_SUPPORT_LEGACY_TEXTRENDERMODE - /** - * Text rendering modes that can be passed to NewRenderTarget* - */ - enum TextRenderMode { - /** - * This will use the standard text rendering method - */ - kStandard_TextRenderMode, - /** - * This will use signed distance fields for text rendering when possible - */ - kDistanceField_TextRenderMode, - }; - static SkSurface* NewRenderTargetDirect(GrRenderTarget*, TextRenderMode); - static SkSurface* NewRenderTarget(GrContext*, const SkImageInfo&, int sampleCount, - TextRenderMode); - static SkSurface* NewScratchRenderTarget(GrContext*, const SkImageInfo&, int sampleCount, - TextRenderMode); -#endif - int width() const { return fWidth; } int height() const { return fHeight; } diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp index 7587f25284..dca4ce771c 100644 --- a/src/image/SkSurface.cpp +++ b/src/image/SkSurface.cpp @@ -176,34 +176,6 @@ bool SkSurface::readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t d } ////////////////////////////////////////////////////////////////////////////////////// -#ifdef SK_SUPPORT_LEGACY_TEXTRENDERMODE - -static SkSurfaceProps make_props(SkSurface::TextRenderMode trm) { - uint32_t propsFlags = 0; - if (SkSurface::kDistanceField_TextRenderMode == trm) { - propsFlags |= SkSurfaceProps::kUseDistanceFieldFonts_Flag; - } - return SkSurfaceProps(propsFlags, SkSurfaceProps::kLegacyFontHost_InitType); -} - -SkSurface* SkSurface::NewRenderTargetDirect(GrRenderTarget* target, TextRenderMode trm) { - SkSurfaceProps props = make_props(trm); - return NewRenderTargetDirect(target, &props); -} - -SkSurface* SkSurface::NewRenderTarget(GrContext* gr, const SkImageInfo& info, int sampleCount, - TextRenderMode trm) { - SkSurfaceProps props = make_props(trm); - return NewRenderTarget(gr, info, sampleCount, &props); -} - -SkSurface* SkSurface::NewScratchRenderTarget(GrContext* gr, const SkImageInfo& info, int sampleCount, - TextRenderMode trm) { - SkSurfaceProps props = make_props(trm); - return NewScratchRenderTarget(gr, info, sampleCount, &props); -} - -#endif #if !SK_SUPPORT_GPU