diff options
author | bungeman <bungeman@google.com> | 2016-10-20 16:06:52 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-10-20 22:00:28 +0000 |
commit | 7cfd46aebda7b7d2b88e73621ed0d1be7244c2ca (patch) | |
tree | ace6ecfe18447644e928f6ef204ab39f2767f24f /src/ports/SkScalerContext_win_dw.h | |
parent | 050ffa9ad5d2bafc935c0a48ce3caed47446be12 (diff) |
SkScalerContext to use smart pointers.
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot;master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot
Change-Id: I27a714388b8ded7dfc968e322b0a587205f575f1
Reviewed-on: https://skia-review.googlesource.com/3731
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/ports/SkScalerContext_win_dw.h')
-rw-r--r-- | src/ports/SkScalerContext_win_dw.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ports/SkScalerContext_win_dw.h b/src/ports/SkScalerContext_win_dw.h index 98c4910b27..bcb7ab47db 100644 --- a/src/ports/SkScalerContext_win_dw.h +++ b/src/ports/SkScalerContext_win_dw.h @@ -23,7 +23,9 @@ class SkDescriptor; class SkScalerContext_DW : public SkScalerContext { public: - SkScalerContext_DW(DWriteFontTypeface*, const SkScalerContextEffects&, const SkDescriptor*); + SkScalerContext_DW(sk_sp<DWriteFontTypeface>, + const SkScalerContextEffects&, + const SkDescriptor*); virtual ~SkScalerContext_DW(); protected: @@ -47,6 +49,10 @@ private: bool isColorGlyph(const SkGlyph& glyph); + DWriteFontTypeface* getDWriteTypeface() { + return static_cast<DWriteFontTypeface*>(this->getTypeface()); + } + #if SK_HAS_DWRITE_2_H bool getColorGlyphRun(const SkGlyph& glyph, IDWriteColorGlyphRunEnumerator** colorGlyph); @@ -70,7 +76,6 @@ private: SkScalar fTextSizeRender; /** The text size to measure with. */ SkScalar fTextSizeMeasure; - SkAutoTUnref<DWriteFontTypeface> fTypeface; int fGlyphCount; DWRITE_RENDERING_MODE fRenderingMode; DWRITE_TEXTURE_TYPE fTextureType; |