Format the world (or just HWUI)
Test: No code changes, just ran through clang-format
Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
diff --git a/libs/hwui/tests/common/TestUtils.cpp b/libs/hwui/tests/common/TestUtils.cpp
index e613776..1e42425 100644
--- a/libs/hwui/tests/common/TestUtils.cpp
+++ b/libs/hwui/tests/common/TestUtils.cpp
@@ -16,17 +16,17 @@
#include "TestUtils.h"
-#include "hwui/Paint.h"
#include "DeferredLayerUpdater.h"
+#include "hwui/Paint.h"
+#include <SkClipStack.h>
#include <minikin/Layout.h>
-#include <renderthread/EglManager.h>
-#include <renderthread/OpenGLPipeline.h>
#include <pipeline/skia/SkiaOpenGLPipeline.h>
#include <pipeline/skia/SkiaVulkanPipeline.h>
+#include <renderthread/EglManager.h>
+#include <renderthread/OpenGLPipeline.h>
#include <renderthread/VulkanManager.h>
#include <utils/Unicode.h>
-#include <SkClipStack.h>
#include <SkGlyphCache.h>
@@ -44,10 +44,10 @@
int endG = (end >> 8) & 0xff;
int endB = end & 0xff;
- return (int)((startA + (int)(fraction * (endA - startA))) << 24)
- | (int)((startR + (int)(fraction * (endR - startR))) << 16)
- | (int)((startG + (int)(fraction * (endG - startG))) << 8)
- | (int)((startB + (int)(fraction * (endB - startB))));
+ return (int)((startA + (int)(fraction * (endA - startA))) << 24) |
+ (int)((startR + (int)(fraction * (endR - startR))) << 16) |
+ (int)((startG + (int)(fraction * (endG - startG))) << 8) |
+ (int)((startB + (int)(fraction * (endB - startB))));
}
sp<DeferredLayerUpdater> TestUtils::createTextureLayerUpdater(
@@ -77,15 +77,16 @@
// updateLayer so it's ready to draw
layerUpdater->updateLayer(true, Matrix4::identity().data);
if (layerUpdater->backingLayer()->getApi() == Layer::Api::OpenGL) {
- static_cast<GlLayer*>(layerUpdater->backingLayer())->setRenderTarget(
- GL_TEXTURE_EXTERNAL_OES);
+ static_cast<GlLayer*>(layerUpdater->backingLayer())
+ ->setRenderTarget(GL_TEXTURE_EXTERNAL_OES);
}
return layerUpdater;
}
void TestUtils::layoutTextUnscaled(const SkPaint& paint, const char* text,
- std::vector<glyph_t>* outGlyphs, std::vector<float>* outPositions,
- float* outTotalAdvance, Rect* outBounds) {
+ std::vector<glyph_t>* outGlyphs,
+ std::vector<float>* outPositions, float* outTotalAdvance,
+ Rect* outBounds) {
Rect bounds;
float totalAdvance = 0;
SkSurfaceProps surfaceProps(0, kUnknown_SkPixelGeometry);
@@ -118,19 +119,18 @@
*outTotalAdvance = totalAdvance;
}
-
-void TestUtils::drawUtf8ToCanvas(Canvas* canvas, const char* text,
- const SkPaint& paint, float x, float y) {
+void TestUtils::drawUtf8ToCanvas(Canvas* canvas, const char* text, const SkPaint& paint, float x,
+ float y) {
auto utf16 = asciiToUtf16(text);
canvas->drawText(utf16.get(), 0, strlen(text), strlen(text), x, y, minikin::Bidi::LTR, paint,
- nullptr);
+ nullptr);
}
-void TestUtils::drawUtf8ToCanvas(Canvas* canvas, const char* text,
- const SkPaint& paint, const SkPath& path) {
+void TestUtils::drawUtf8ToCanvas(Canvas* canvas, const char* text, const SkPaint& paint,
+ const SkPath& path) {
auto utf16 = asciiToUtf16(text);
canvas->drawTextOnPath(utf16.get(), strlen(text), minikin::Bidi::LTR, path, 0, 0, paint,
- nullptr);
+ nullptr);
}
void TestUtils::TestTask::run() {