diff options
author | John Reck <jreck@google.com> | 2017-11-03 10:12:19 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2017-11-03 10:57:44 -0700 |
commit | 1bcacfdcab0eaa0cee92bd7f5a1b5e271dd68e52 (patch) | |
tree | 4a1366cf2d1cf50b5ec4ed1a8cf0f437053cd0d7 /libs/hwui/Vertex.h | |
parent | 30ec71c0fe194a551d2e4abaff2159e0730488e0 (diff) |
Format the world (or just HWUI)
Test: No code changes, just ran through clang-format
Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
Diffstat (limited to 'libs/hwui/Vertex.h')
-rw-r--r-- | libs/hwui/Vertex.h | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/libs/hwui/Vertex.h b/libs/hwui/Vertex.h index db982ad0c8f4..186d0a88a33e 100644 --- a/libs/hwui/Vertex.h +++ b/libs/hwui/Vertex.h @@ -45,15 +45,13 @@ struct Vertex { vertex->y = y; } - static inline void set(Vertex* vertex, Vector2 val) { - set(vertex, val.x, val.y); - } + static inline void set(Vertex* vertex, Vector2 val) { set(vertex, val.x, val.y); } static inline void copyWithOffset(Vertex* vertex, const Vertex& src, float x, float y) { set(vertex, src.x + x, src.y + y); } -}; // struct Vertex +}; // struct Vertex REQUIRE_COMPATIBLE_LAYOUT(Vertex); @@ -65,14 +63,14 @@ struct TextureVertex { float u, v; static inline void set(TextureVertex* vertex, float x, float y, float u, float v) { - *vertex = { x, y, u, v }; + *vertex = {x, y, u, v}; } static inline void setUV(TextureVertex* vertex, float u, float v) { vertex[0].u = u; vertex[0].v = v; } -}; // struct TextureVertex +}; // struct TextureVertex REQUIRE_COMPATIBLE_LAYOUT(TextureVertex); @@ -83,15 +81,15 @@ REQUIRE_COMPATIBLE_LAYOUT(TextureVertex); struct ColorTextureVertex { float x, y; float u, v; - float r, g, b, a; // pre-multiplied linear + float r, g, b, a; // pre-multiplied linear - static inline void set(ColorTextureVertex* vertex, float x, float y, - float u, float v, uint32_t color) { + static inline void set(ColorTextureVertex* vertex, float x, float y, float u, float v, + uint32_t color) { FloatColor c; c.set(color); - *vertex = { x, y, u, v, c.r, c.g, c.b, c.a }; + *vertex = {x, y, u, v, c.r, c.g, c.b, c.a}; } -}; // struct ColorTextureVertex +}; // struct ColorTextureVertex REQUIRE_COMPATIBLE_LAYOUT(ColorTextureVertex); @@ -103,22 +101,20 @@ struct AlphaVertex { float alpha; static inline void set(AlphaVertex* vertex, float x, float y, float alpha) { - *vertex = { x, y, alpha }; + *vertex = {x, y, alpha}; } - static inline void copyWithOffset(AlphaVertex* vertex, const AlphaVertex& src, - float x, float y) { + static inline void copyWithOffset(AlphaVertex* vertex, const AlphaVertex& src, float x, + float y) { AlphaVertex::set(vertex, src.x + x, src.y + y, src.alpha); } - static inline void setColor(AlphaVertex* vertex, float alpha) { - vertex[0].alpha = alpha; - } -}; // struct AlphaVertex + static inline void setColor(AlphaVertex* vertex, float alpha) { vertex[0].alpha = alpha; } +}; // struct AlphaVertex REQUIRE_COMPATIBLE_LAYOUT(AlphaVertex); -}; // namespace uirenderer -}; // namespace android +}; // namespace uirenderer +}; // namespace android -#endif // ANDROID_HWUI_VERTEX_H +#endif // ANDROID_HWUI_VERTEX_H |