diff options
author | Florin Malita <fmalita@chromium.org> | 2017-05-03 15:23:21 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-03 20:02:07 +0000 |
commit | f40b24913a99fc6fcc4b7f60e4dfcda980a16ee1 (patch) | |
tree | cefa01609c03211bd049e928ce9e4dfe8d4ba4d9 /src/core/SkSurfacePriv.h | |
parent | e80e6183e5e1531555aaf9b5cee58c5e663d2934 (diff) |
Validate SkSpecialSurface raster info
BUG=chromium:716311
Change-Id: I01ea2e77ba8920f735395dd46ef2cea78a858308
Reviewed-on: https://skia-review.googlesource.com/15230
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'src/core/SkSurfacePriv.h')
-rw-r--r-- | src/core/SkSurfacePriv.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/SkSurfacePriv.h b/src/core/SkSurfacePriv.h index 74d19a6df4..a41b583f02 100644 --- a/src/core/SkSurfacePriv.h +++ b/src/core/SkSurfacePriv.h @@ -10,6 +10,8 @@ #include "SkSurfaceProps.h" +struct SkImageInfo; + static inline SkSurfaceProps SkSurfacePropsCopyOrDefault(const SkSurfaceProps* props) { if (props) { return *props; @@ -22,4 +24,8 @@ static inline SkPixelGeometry SkSurfacePropsDefaultPixelGeometry() { return SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType).pixelGeometry(); } +constexpr size_t kIgnoreRowBytesValue = static_cast<size_t>(~0); + +bool SkSurfaceValidateRasterInfo(const SkImageInfo&, size_t rb = kIgnoreRowBytesValue); + #endif |