Format the world (or just HWUI)
Test: No code changes, just ran through clang-format
Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
diff --git a/libs/hwui/Outline.h b/libs/hwui/Outline.h
index 922ff7c..77d7bef 100644
--- a/libs/hwui/Outline.h
+++ b/libs/hwui/Outline.h
@@ -26,27 +26,14 @@
class Outline {
public:
- enum class Type {
- None = 0,
- Empty = 1,
- ConvexPath = 2,
- RoundRect = 3
- };
+ enum class Type { None = 0, Empty = 1, ConvexPath = 2, RoundRect = 3 };
- Outline()
- : mShouldClip(false)
- , mType(Type::None)
- , mRadius(0)
- , mAlpha(0.0f) {}
+ Outline() : mShouldClip(false), mType(Type::None), mRadius(0), mAlpha(0.0f) {}
void setRoundRect(int left, int top, int right, int bottom, float radius, float alpha) {
mAlpha = alpha;
- if (mType == Type::RoundRect
- && left == mBounds.left
- && right == mBounds.right
- && top == mBounds.top
- && bottom == mBounds.bottom
- && radius == mRadius) {
+ if (mType == Type::RoundRect && left == mBounds.left && right == mBounds.right &&
+ top == mBounds.top && bottom == mBounds.bottom && radius == mRadius) {
// nothing to change, don't do any work
return;
}
@@ -58,8 +45,7 @@
// update mPath to reflect new outline
mPath.reset();
if (MathUtils::isPositive(radius)) {
- mPath.addRoundRect(SkRect::MakeLTRB(left, top, right, bottom),
- radius, radius);
+ mPath.addRoundRect(SkRect::MakeLTRB(left, top, right, bottom), radius, radius);
} else {
mPath.addRect(left, top, right, bottom);
}
@@ -88,21 +74,13 @@
mAlpha = 0.0f;
}
- bool isEmpty() const {
- return mType == Type::Empty;
- }
+ bool isEmpty() const { return mType == Type::Empty; }
- float getAlpha() const {
- return mAlpha;
- }
+ float getAlpha() const { return mAlpha; }
- void setShouldClip(bool clip) {
- mShouldClip = clip;
- }
+ void setShouldClip(bool clip) { mShouldClip = clip; }
- bool getShouldClip() const {
- return mShouldClip;
- }
+ bool getShouldClip() const { return mShouldClip; }
bool willClip() const {
// only round rect outlines can be used for clipping
@@ -129,17 +107,11 @@
return &mPath;
}
- Type getType() const {
- return mType;
- }
+ Type getType() const { return mType; }
- const Rect& getBounds() const {
- return mBounds;
- }
+ const Rect& getBounds() const { return mBounds; }
- float getRadius() const {
- return mRadius;
- }
+ float getRadius() const { return mRadius; }
private:
bool mShouldClip;