Run clang-format on libhostgraphics
Bug: 322360037
Test: N/A
Change-Id: I346805e599a41abcd1eaaa51f5654cb323e5146f
diff --git a/libs/hostgraphics/ui/Fence.h b/libs/hostgraphics/ui/Fence.h
index 04d535c..187c311 100644
--- a/libs/hostgraphics/ui/Fence.h
+++ b/libs/hostgraphics/ui/Fence.h
@@ -17,8 +17,8 @@
#ifndef ANDROID_FENCE_H
#define ANDROID_FENCE_H
-#include <utils/String8.h>
#include <utils/RefBase.h>
+#include <utils/String8.h>
typedef int64_t nsecs_t;
@@ -26,11 +26,14 @@
class Fence : public LightRefBase<Fence> {
public:
- Fence() { }
- Fence(int) { }
+ Fence() {}
+
+ Fence(int) {}
+
static const sp<Fence> NO_FENCE;
static constexpr nsecs_t SIGNAL_TIME_PENDING = INT64_MAX;
static constexpr nsecs_t SIGNAL_TIME_INVALID = -1;
+
static sp<Fence> merge(const char* name, const sp<Fence>& f1, const sp<Fence>& f2) {
return NO_FENCE;
}
@@ -40,16 +43,22 @@
}
enum class Status {
- Invalid, // Fence is invalid
- Unsignaled, // Fence is valid but has not yet signaled
- Signaled, // Fence is valid and has signaled
+ Invalid, // Fence is invalid
+ Unsignaled, // Fence is valid but has not yet signaled
+ Signaled, // Fence is valid and has signaled
};
- status_t wait(int timeout) { return OK; }
+ status_t wait(int timeout) {
+ return OK;
+ }
- status_t waitForever(const char* logname) { return OK; }
+ status_t waitForever(const char* logname) {
+ return OK;
+ }
- int dup() const { return 0; }
+ int dup() const {
+ return 0;
+ }
inline Status getStatus() {
// The sync_wait call underlying wait() has been measured to be
diff --git a/libs/hostgraphics/ui/GraphicBuffer.h b/libs/hostgraphics/ui/GraphicBuffer.h
index eec9b23..cda45e46 100644
--- a/libs/hostgraphics/ui/GraphicBuffer.h
+++ b/libs/hostgraphics/ui/GraphicBuffer.h
@@ -19,34 +19,51 @@
#include <stdint.h>
#include <sys/types.h>
-
-#include <vector>
-
#include <ui/ANativeObjectBase.h>
#include <ui/PixelFormat.h>
#include <ui/Rect.h>
#include <utils/RefBase.h>
+#include <vector>
+
namespace android {
class GraphicBuffer : public ANativeObjectBase<ANativeWindowBuffer, GraphicBuffer, RefBase> {
public:
GraphicBuffer(uint32_t w, uint32_t h) {
- data.resize(w*h);
+ data.resize(w * h);
reserved[0] = data.data();
width = w;
height = h;
}
- uint32_t getWidth() const { return static_cast<uint32_t>(width); }
- uint32_t getHeight() const { return static_cast<uint32_t>(height); }
- uint32_t getStride() const { return static_cast<uint32_t>(width); }
- uint64_t getUsage() const { return 0; }
- PixelFormat getPixelFormat() const { return PIXEL_FORMAT_RGBA_8888; }
- Rect getBounds() const { return Rect(width, height); }
+ uint32_t getWidth() const {
+ return static_cast<uint32_t>(width);
+ }
- status_t lockAsyncYCbCr(uint32_t inUsage, const Rect& rect,
- android_ycbcr *ycbcr, int fenceFd) { return OK; }
+ uint32_t getHeight() const {
+ return static_cast<uint32_t>(height);
+ }
+
+ uint32_t getStride() const {
+ return static_cast<uint32_t>(width);
+ }
+
+ uint64_t getUsage() const {
+ return 0;
+ }
+
+ PixelFormat getPixelFormat() const {
+ return PIXEL_FORMAT_RGBA_8888;
+ }
+
+ Rect getBounds() const {
+ return Rect(width, height);
+ }
+
+ status_t lockAsyncYCbCr(uint32_t inUsage, const Rect& rect, android_ycbcr* ycbcr, int fenceFd) {
+ return OK;
+ }
status_t lockAsync(uint32_t inUsage, const Rect& rect, void** vaddr, int fenceFd,
int32_t* outBytesPerPixel = nullptr, int32_t* outBytesPerStride = nullptr) {
@@ -54,7 +71,9 @@
return OK;
}
- status_t unlockAsync(int *fenceFd) { return OK; }
+ status_t unlockAsync(int* fenceFd) {
+ return OK;
+ }
private:
std::vector<uint32_t> data;