diff options
author | Herb Derby <herb@google.com> | 2018-03-05 15:23:32 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-05 21:06:35 +0000 |
commit | 974aa8eaba6ca7df70ef498ce6e72a80390bfa00 (patch) | |
tree | 77b903dc5f0140fe0981b4a14e4d057ad1bdc6c3 | |
parent | 9d28974d16d13f847d11400a82f5169523feed28 (diff) |
Remove routines no longer needed since stripping NVPR
Change-Id: Ia1a545cc5c52d9af654f980083803ece39a92614
Reviewed-on: https://skia-review.googlesource.com/112260
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
-rw-r--r-- | include/core/SkTypeface.h | 1 | ||||
-rw-r--r-- | src/gpu/GrPathRendering.cpp | 25 | ||||
-rw-r--r-- | src/gpu/GrPathRendering.h | 30 | ||||
-rw-r--r-- | src/gpu/GrResourceProvider.cpp | 19 | ||||
-rw-r--r-- | src/gpu/GrResourceProvider.h | 3 |
5 files changed, 0 insertions, 78 deletions
diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h index 6fb663d473..fb2c64a200 100644 --- a/include/core/SkTypeface.h +++ b/include/core/SkTypeface.h @@ -367,7 +367,6 @@ private: static SkTypeface* NormalizeTypeface(SkTypeface* typeface) { return typeface != nullptr ? typeface : SkTypeface::GetDefaultTypeface(); } - friend class GrPathRendering; // GetDefaultTypeface friend class SkGlyphCache; // GetDefaultTypeface friend class SkPaint; // GetDefaultTypeface friend class SkScalerContext; // GetDefaultTypeface diff --git a/src/gpu/GrPathRendering.cpp b/src/gpu/GrPathRendering.cpp index 1f15402c06..b16ff91ef2 100644 --- a/src/gpu/GrPathRendering.cpp +++ b/src/gpu/GrPathRendering.cpp @@ -72,31 +72,6 @@ private: #endif }; -sk_sp<GrPathRange> GrPathRendering::createGlyphs(const SkTypeface* typeface, - const SkScalerContextEffects& effects, - const SkDescriptor* desc, - const GrStyle& style) { - if (nullptr == typeface) { - typeface = SkTypeface::GetDefaultTypeface(); - SkASSERT(nullptr != typeface); - } - - if (desc) { - sk_sp<GlyphGenerator> generator(new GlyphGenerator(*typeface, effects, *desc)); - return this->createPathRange(generator.get(), style); - } - - SkAutoDescriptor ad; - SkDescriptor* genericDesc = - SkScalerContext::MakeDescriptorForPaths(typeface->uniqueID(), &ad); - - // No effects, so we make a dummy struct - SkScalerContextEffects noEffects; - - sk_sp<GlyphGenerator> generator(new GlyphGenerator(*typeface, noEffects, *genericDesc)); - return this->createPathRange(generator.get(), style); -} - void GrPathRendering::stencilPath(const StencilPathArgs& args, const GrPath* path) { fGpu->handleDirtyContext(); this->onStencilPath(args, path); diff --git a/src/gpu/GrPathRendering.h b/src/gpu/GrPathRendering.h index c32e7891b5..e3d9731130 100644 --- a/src/gpu/GrPathRendering.h +++ b/src/gpu/GrPathRendering.h @@ -100,36 +100,6 @@ public: */ virtual sk_sp<GrPathRange> createPathRange(GrPathRange::PathGenerator*, const GrStyle&) = 0; - /** - * Creates a range of glyph paths, indexed by glyph id. The glyphs will have an - * inverted y-direction in order to match the raw font path data. - * - * @param SkTypeface Typeface that defines the glyphs. - * If null, the default typeface will be used. - * - * @param SkDescriptor Additional font configuration that specifies the font's size, - * stroke, and other flags. This will generally come from an - * SkGlyphCache. - * - * It is recommended to leave this value null when possible, in - * which case the glyphs will be loaded directly from the font's - * raw path data and sized at SkPaint::kCanonicalTextSizeForPaths. - * This will result in less memory usage and more efficient paths. - * - * If non-null, the glyph paths will match the font descriptor, - * including with the stroke information baked directly into - * the outlines. - * - * @param GrStyle Common style that the GPU will apply to every path. Note that - * if the glyph outlines contain baked-in styles from the font - * descriptor, the GPU style will be applied on top of those - * outlines. - * - * @return a new path range populated with glyphs. - */ - sk_sp<GrPathRange> createGlyphs(const SkTypeface*, const SkScalerContextEffects&, - const SkDescriptor*, const GrStyle&); - /** None of these params are optional, pointers used just to avoid making copies. */ struct StencilPathArgs { StencilPathArgs(bool useHWAA, diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp index 62a17a4a16..f81eea3884 100644 --- a/src/gpu/GrResourceProvider.cpp +++ b/src/gpu/GrResourceProvider.cpp @@ -360,25 +360,6 @@ sk_sp<GrPath> GrResourceProvider::createPath(const SkPath& path, const GrStyle& return this->gpu()->pathRendering()->createPath(path, style); } -sk_sp<GrPathRange> GrResourceProvider::createPathRange(GrPathRange::PathGenerator* gen, - const GrStyle& style) { - if (this->isAbandoned()) { - return nullptr; - } - - SkASSERT(this->gpu()->pathRendering()); - return this->gpu()->pathRendering()->createPathRange(gen, style); -} - -sk_sp<GrPathRange> GrResourceProvider::createGlyphs(const SkTypeface* tf, - const SkScalerContextEffects& effects, - const SkDescriptor* desc, - const GrStyle& style) { - - SkASSERT(this->gpu()->pathRendering()); - return this->gpu()->pathRendering()->createGlyphs(tf, effects, desc, style); -} - GrBuffer* GrResourceProvider::createBuffer(size_t size, GrBufferType intendedType, GrAccessPattern accessPattern, uint32_t flags, const void* data) { diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h index 2ad1202bb7..083f5a90f6 100644 --- a/src/gpu/GrResourceProvider.h +++ b/src/gpu/GrResourceProvider.h @@ -170,9 +170,6 @@ public: * is not supported. */ sk_sp<GrPath> createPath(const SkPath&, const GrStyle&); - sk_sp<GrPathRange> createPathRange(GrPathRange::PathGenerator*, const GrStyle&); - sk_sp<GrPathRange> createGlyphs(const SkTypeface*, const SkScalerContextEffects&, - const SkDescriptor*, const GrStyle&); /** These flags govern which scratch resources we are allowed to return */ enum Flags { |