aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-04-30 16:35:25 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-04-30 16:35:25 +0000
commita95ea2c518577a6696dc0b786ad3aaf7315af850 (patch)
tree46168db6b071dce7b3890b36a2a737ad1d25799c
parent8a0d8ff854a034ff742341a2eb4bf68ba6ea1b9c (diff)
code-style cleanups only
git-svn-id: http://skia.googlecode.com/svn/trunk@3796 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/core/SkRegionPriv.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/core/SkRegionPriv.h b/src/core/SkRegionPriv.h
index 648643f7a0..cef4b3547d 100644
--- a/src/core/SkRegionPriv.h
+++ b/src/core/SkRegionPriv.h
@@ -22,8 +22,7 @@ struct SkRegion::RunHead {
int32_t fRefCnt;
int32_t fRunCount;
- static RunHead* Alloc(int count)
- {
+ static RunHead* Alloc(int count) {
//SkDEBUGCODE(sk_atomic_inc(&gRgnAllocCounter);)
//SkDEBUGF(("************** gRgnAllocCounter::alloc %d\n", gRgnAllocCounter));
@@ -35,30 +34,26 @@ struct SkRegion::RunHead {
return head;
}
- bool isComplex() const
- {
+ bool isComplex() const {
return this != SkRegion_gEmptyRunHeadPtr && this != SkRegion_gRectRunHeadPtr;
}
- SkRegion::RunType* writable_runs()
- {
+ SkRegion::RunType* writable_runs() {
SkASSERT(this->isComplex());
SkASSERT(fRefCnt == 1);
return (SkRegion::RunType*)(this + 1);
}
- const SkRegion::RunType* readonly_runs() const
- {
+
+ const SkRegion::RunType* readonly_runs() const {
SkASSERT(this->isComplex());
return (const SkRegion::RunType*)(this + 1);
}
- RunHead* ensureWritable()
- {
+ RunHead* ensureWritable() {
SkASSERT(this->isComplex());
RunHead* writable = this;
- if (fRefCnt > 1)
- {
+ if (fRefCnt > 1) {
// We need to alloc & copy the current region before we call
// sk_atomic_dec because it could be freed in the meantime,
// otherwise.
@@ -69,8 +64,7 @@ struct SkRegion::RunHead {
// fRefCount might have changed since we last checked.
// If we own the last reference at this point, we need to
// free the memory.
- if (sk_atomic_dec(&fRefCnt) == 1)
- {
+ if (sk_atomic_dec(&fRefCnt) == 1) {
sk_free(this);
}
}