Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Side by Side Diff: include/core/SkMask.h

Issue 1539553002: Add default ctor to SkMask (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add warning for ignored return values Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gm/blurrect.cpp ('k') | include/core/SkMaskFilter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkMask_DEFINED 10 #ifndef SkMask_DEFINED
11 #define SkMask_DEFINED 11 #define SkMask_DEFINED
12 12
13 #include "SkRect.h" 13 #include "SkRect.h"
14 14
15 /** \class SkMask 15 /** \class SkMask
16 SkMask is used to describe alpha bitmaps, either 1bit, 8bit, or 16 SkMask is used to describe alpha bitmaps, either 1bit, 8bit, or
17 the 3-channel 3D format. These are passed to SkMaskFilter objects. 17 the 3-channel 3D format. These are passed to SkMaskFilter objects.
18 */ 18 */
19 struct SkMask { 19 struct SkMask {
20 SkMask() : fImage(nullptr) {}
21
20 enum Format { 22 enum Format {
21 kBW_Format, //!< 1bit per pixel mask (e.g. monochrome) 23 kBW_Format, //!< 1bit per pixel mask (e.g. monochrome)
22 kA8_Format, //!< 8bits per pixel mask (e.g. antialiasing) 24 kA8_Format, //!< 8bits per pixel mask (e.g. antialiasing)
23 k3D_Format, //!< 3 8bit per pixl planes: alpha, mul, add 25 k3D_Format, //!< 3 8bit per pixl planes: alpha, mul, add
24 kARGB32_Format, //!< SkPMColor 26 kARGB32_Format, //!< SkPMColor
25 kLCD16_Format, //!< 565 alpha for r/g/b 27 kLCD16_Format, //!< 565 alpha for r/g/b
26 }; 28 };
27 29
28 enum { 30 enum {
29 kCountMaskFormats = kLCD16_Format + 1 31 kCountMaskFormats = kLCD16_Format + 1
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 ~SkAutoMaskFreeImage() { 141 ~SkAutoMaskFreeImage() {
140 SkMask::FreeImage(fImage); 142 SkMask::FreeImage(fImage);
141 } 143 }
142 144
143 private: 145 private:
144 uint8_t* fImage; 146 uint8_t* fImage;
145 }; 147 };
146 #define SkAutoMaskFreeImage(...) SK_REQUIRE_LOCAL_VAR(SkAutoMaskFreeImage) 148 #define SkAutoMaskFreeImage(...) SK_REQUIRE_LOCAL_VAR(SkAutoMaskFreeImage)
147 149
148 #endif 150 #endif
OLDNEW
« no previous file with comments | « gm/blurrect.cpp ('k') | include/core/SkMaskFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698