aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-20 11:04:30 +0000
committerGravatar mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-20 11:04:30 +0000
commit4135f2893289dd37b662a32dd1f3d9e79a0eabf3 (patch)
tree240af467d8ec356eab0be04472fe9230485c6bcd /include/core
parentebe5bcd7434666ffe3b56526b3d67e5ac4b17f60 (diff)
code style
git-svn-id: http://skia.googlecode.com/svn/trunk@1158 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkMask.h5
-rw-r--r--include/core/SkMaskFilter.h16
2 files changed, 12 insertions, 9 deletions
diff --git a/include/core/SkMask.h b/include/core/SkMask.h
index ebb870feaf..f437622388 100644
--- a/include/core/SkMask.h
+++ b/include/core/SkMask.h
@@ -126,10 +126,11 @@ struct SkMask {
*/
unsigned rowWordsLCD() const {
SkASSERT(fFormat == kHorizontalLCD_Format || fFormat == kVerticalLCD_Format);
- if (fFormat == kHorizontalLCD_Format)
+ if (fFormat == kHorizontalLCD_Format) {
return fBounds.width() + 2;
- else
+ } else {
return fBounds.width();
+ }
}
static uint8_t* AllocImage(size_t bytes);
diff --git a/include/core/SkMaskFilter.h b/include/core/SkMaskFilter.h
index 749a73a651..641ad83886 100644
--- a/include/core/SkMaskFilter.h
+++ b/include/core/SkMaskFilter.h
@@ -44,7 +44,7 @@ public:
/** Returns the format of the resulting mask that this subclass will return
when its filterMask() method is called.
*/
- virtual SkMask::Format getFormat() = 0;
+ virtual SkMask::Format getFormat() = 0;
/** Create a new mask by filter the src mask.
If src.fImage == null, then do not allocate or create the dst image
@@ -59,7 +59,8 @@ public:
applying the filter. If returning false, ignore this parameter.
@return true if the dst mask was correctly created.
*/
- virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix&, SkIPoint* margin);
+ virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix&,
+ SkIPoint* margin);
/** Helper method that, given a path in device space, will rasterize it into a kA8_Format mask
and then call filterMask(). If this returns true, the specified blitter will be called
@@ -70,6 +71,7 @@ public:
const SkRegion& devClip, SkBounder*, SkBlitter* blitter);
virtual void flatten(SkFlattenableWriteBuffer& ) {}
+
protected:
// empty for now, but lets get our subclass to remember to init us for the future
SkMaskFilter(SkFlattenableReadBuffer&) {}
@@ -82,14 +84,14 @@ protected:
*/
class SkAutoMaskImage {
public:
- SkAutoMaskImage(SkMask* mask, bool alloc)
- {
- if (alloc)
+ SkAutoMaskImage(SkMask* mask, bool alloc) {
+ if (alloc) {
mask->fImage = SkMask::AllocImage(mask->computeImageSize());
+ }
fImage = mask->fImage;
}
- ~SkAutoMaskImage()
- {
+
+ ~SkAutoMaskImage() {
SkMask::FreeImage(fImage);
}
private: