diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-09-11 12:47:26 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-09-11 12:47:26 +0200 |
commit | cbfef7fcdb853916ff04015f6ee2d4b86f424a08 (patch) | |
tree | 144555250f4c6ec88bc5619fc449c4195dcd0fda /dom/base/nsContentUtils.h | |
parent | 6ded94d38cf94a5da8d6a73dfbfca2acb0d719cc (diff) | |
download | UXP-cbfef7fcdb853916ff04015f6ee2d4b86f424a08.tar UXP-cbfef7fcdb853916ff04015f6ee2d4b86f424a08.tar.gz UXP-cbfef7fcdb853916ff04015f6ee2d4b86f424a08.tar.lz UXP-cbfef7fcdb853916ff04015f6ee2d4b86f424a08.tar.xz UXP-cbfef7fcdb853916ff04015f6ee2d4b86f424a08.zip |
Move surface data checking to a separate function to make it less "totally nuts"
Diffstat (limited to 'dom/base/nsContentUtils.h')
-rw-r--r-- | dom/base/nsContentUtils.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h index c255f813a..98df92efb 100644 --- a/dom/base/nsContentUtils.h +++ b/dom/base/nsContentUtils.h @@ -975,11 +975,17 @@ public: static bool PrefetchEnabled(nsIDocShell* aDocShell); + static nsresult CalculateBufferSizeForImage(const uint32_t& aStride, + const mozilla::gfx::IntSize& aImageSize, + const mozilla::gfx::SurfaceFormat& aFormat, + size_t* aMaxBufferSize, + size_t* aUsedBufferSize); + +private: /** * Fill (with the parameters given) the localized string named |aKey| in * properties file |aFile|. */ -private: static nsresult FormatLocalizedString(PropertiesFile aFile, const char* aKey, const char16_t** aParams, |