aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-12-17 11:33:12 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-17 11:33:12 -0800
commite80eb928ba0248a5a5dea6e1f0005aa08ecf8740 (patch)
tree87bf6f73175a6a404308eb36b18337116a6396aa /include/core
parent1250944aaa9251c08eda3a37b21f15106903f42d (diff)
Add default ctor to SkMask
The minimal fix here seems to be handling BoxBlur's return value in SkBlurMaskFilter.cpp::GrRRectBlurEffect::Create. We seem to do enough special handling of the fImage field though that always initialializing it may not be a bad idea. BUG=570232 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1539553002 Review URL: https://codereview.chromium.org/1539553002
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkMask.h2
-rw-r--r--include/core/SkMaskFilter.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/core/SkMask.h b/include/core/SkMask.h
index 7be6aff614..a6d5606478 100644
--- a/include/core/SkMask.h
+++ b/include/core/SkMask.h
@@ -17,6 +17,8 @@
the 3-channel 3D format. These are passed to SkMaskFilter objects.
*/
struct SkMask {
+ SkMask() : fImage(nullptr) {}
+
enum Format {
kBW_Format, //!< 1bit per pixel mask (e.g. monochrome)
kA8_Format, //!< 8bits per pixel mask (e.g. antialiasing)
diff --git a/include/core/SkMaskFilter.h b/include/core/SkMaskFilter.h
index 1fe1d9adaf..8d3d1caa67 100644
--- a/include/core/SkMaskFilter.h
+++ b/include/core/SkMaskFilter.h
@@ -184,9 +184,7 @@ protected:
class NinePatch : ::SkNoncopyable {
public:
- NinePatch() : fCache(NULL) {
- fMask.fImage = NULL;
- }
+ NinePatch() : fCache(nullptr) { }
~NinePatch();
SkMask fMask; // fBounds must have [0,0] in its top-left