diff options
author | bungeman <bungeman@google.com> | 2014-08-28 11:42:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-28 11:42:29 -0700 |
commit | 683a37692bc67ef1144922b73a1e871e7e1e842e (patch) | |
tree | bc57e931011763ca908030952fb0dbc764f949e6 /src/ports/SkScalerContext_win_dw.h | |
parent | 63b9dc82474a4daf195c6157a711be401f7a0ddd (diff) |
Fix error handling in DirectWrite with tiny text.
If there is an error while trying to determine the metrics,
we need to bail instead of potentially using uninitialized data.
R=reed@google.com, mtklein@google.com
Author: bungeman@google.com
Review URL: https://codereview.chromium.org/511783003
Diffstat (limited to 'src/ports/SkScalerContext_win_dw.h')
-rw-r--r-- | src/ports/SkScalerContext_win_dw.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ports/SkScalerContext_win_dw.h b/src/ports/SkScalerContext_win_dw.h index e9eab94de1..0bd79e7d82 100644 --- a/src/ports/SkScalerContext_win_dw.h +++ b/src/ports/SkScalerContext_win_dw.h @@ -37,10 +37,10 @@ private: DWRITE_RENDERING_MODE renderingMode, DWRITE_TEXTURE_TYPE textureType); - void getBoundingBox(SkGlyph* glyph, - DWRITE_RENDERING_MODE renderingMode, - DWRITE_TEXTURE_TYPE textureType, - RECT* bbox); + HRESULT getBoundingBox(SkGlyph* glyph, + DWRITE_RENDERING_MODE renderingMode, + DWRITE_TEXTURE_TYPE textureType, + RECT* bbox); SkTDArray<uint8_t> fBits; /** The total matrix without the text height scale. */ |