| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkScalerContext.h" | 10 #include "SkScalerContext.h" |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 } | 836 } |
| 837 | 837 |
| 838 /////////////////////////////////////////////////////////////////////////////// | 838 /////////////////////////////////////////////////////////////////////////////// |
| 839 | 839 |
| 840 class SkScalerContext_Empty : public SkScalerContext { | 840 class SkScalerContext_Empty : public SkScalerContext { |
| 841 public: | 841 public: |
| 842 SkScalerContext_Empty(SkTypeface* face, const SkDescriptor* desc) | 842 SkScalerContext_Empty(SkTypeface* face, const SkDescriptor* desc) |
| 843 : SkScalerContext(face, desc) {} | 843 : SkScalerContext(face, desc) {} |
| 844 | 844 |
| 845 protected: | 845 protected: |
| 846 unsigned generateGlyphCount() SK_OVERRIDE { | 846 unsigned generateGlyphCount() override { |
| 847 return 0; | 847 return 0; |
| 848 } | 848 } |
| 849 uint16_t generateCharToGlyph(SkUnichar uni) SK_OVERRIDE { | 849 uint16_t generateCharToGlyph(SkUnichar uni) override { |
| 850 return 0; | 850 return 0; |
| 851 } | 851 } |
| 852 void generateAdvance(SkGlyph* glyph) SK_OVERRIDE { | 852 void generateAdvance(SkGlyph* glyph) override { |
| 853 glyph->zeroMetrics(); | 853 glyph->zeroMetrics(); |
| 854 } | 854 } |
| 855 void generateMetrics(SkGlyph* glyph) SK_OVERRIDE { | 855 void generateMetrics(SkGlyph* glyph) override { |
| 856 glyph->zeroMetrics(); | 856 glyph->zeroMetrics(); |
| 857 } | 857 } |
| 858 void generateImage(const SkGlyph& glyph) SK_OVERRIDE {} | 858 void generateImage(const SkGlyph& glyph) override {} |
| 859 void generatePath(const SkGlyph& glyph, SkPath* path) SK_OVERRIDE {} | 859 void generatePath(const SkGlyph& glyph, SkPath* path) override {} |
| 860 void generateFontMetrics(SkPaint::FontMetrics* metrics) SK_OVERRIDE { | 860 void generateFontMetrics(SkPaint::FontMetrics* metrics) override { |
| 861 if (metrics) { | 861 if (metrics) { |
| 862 sk_bzero(metrics, sizeof(*metrics)); | 862 sk_bzero(metrics, sizeof(*metrics)); |
| 863 } | 863 } |
| 864 } | 864 } |
| 865 }; | 865 }; |
| 866 | 866 |
| 867 extern SkScalerContext* SkCreateColorScalerContext(const SkDescriptor* desc); | 867 extern SkScalerContext* SkCreateColorScalerContext(const SkDescriptor* desc); |
| 868 | 868 |
| 869 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc, | 869 SkScalerContext* SkTypeface::createScalerContext(const SkDescriptor* desc, |
| 870 bool allowFailure) const { | 870 bool allowFailure) const { |
| 871 SkScalerContext* c = this->onCreateScalerContext(desc); | 871 SkScalerContext* c = this->onCreateScalerContext(desc); |
| 872 | 872 |
| 873 if (!c && !allowFailure) { | 873 if (!c && !allowFailure) { |
| 874 c = SkNEW_ARGS(SkScalerContext_Empty, | 874 c = SkNEW_ARGS(SkScalerContext_Empty, |
| 875 (const_cast<SkTypeface*>(this), desc)); | 875 (const_cast<SkTypeface*>(this), desc)); |
| 876 } | 876 } |
| 877 return c; | 877 return c; |
| 878 } | 878 } |
| OLD | NEW |