Run clang-format on libhostgraphics
Bug: 322360037
Test: N/A
Change-Id: I346805e599a41abcd1eaaa51f5654cb323e5146f
diff --git a/libs/hostgraphics/gui/Surface.h b/libs/hostgraphics/gui/Surface.h
index 0d81037..2774f89 100644
--- a/libs/hostgraphics/gui/Surface.h
+++ b/libs/hostgraphics/gui/Surface.h
@@ -28,17 +28,25 @@
class Surface : public ANativeObjectBase<ANativeWindow, Surface, RefBase> {
public:
explicit Surface(const sp<IGraphicBufferProducer>& bufferProducer, bool controlledByApp = false)
- : mBufferProducer(bufferProducer) {
+ : mBufferProducer(bufferProducer) {
ANativeWindow::perform = hook_perform;
ANativeWindow::dequeueBuffer = hook_dequeueBuffer;
ANativeWindow::query = hook_query;
}
- static bool isValid(const sp<Surface>& surface) { return surface != nullptr; }
+
+ static bool isValid(const sp<Surface>& surface) {
+ return surface != nullptr;
+ }
+
void allocateBuffers() {}
- uint64_t getNextFrameNumber() const { return 0; }
+ uint64_t getNextFrameNumber() const {
+ return 0;
+ }
- int setScalingMode(int mode) { return 0; }
+ int setScalingMode(int mode) {
+ return 0;
+ }
virtual int disconnect(int api,
IGraphicBufferProducer::DisconnectMode mode =
@@ -50,16 +58,28 @@
// TODO: implement this
return 0;
}
- virtual int unlockAndPost() { return 0; }
- virtual int query(int what, int* value) const { return mBufferProducer->query(what, value); }
- status_t setDequeueTimeout(nsecs_t timeout) { return OK; }
+ virtual int unlockAndPost() {
+ return 0;
+ }
- nsecs_t getLastDequeueStartTime() const { return 0; }
+ virtual int query(int what, int* value) const {
+ return mBufferProducer->query(what, value);
+ }
+
+ status_t setDequeueTimeout(nsecs_t timeout) {
+ return OK;
+ }
+
+ nsecs_t getLastDequeueStartTime() const {
+ return 0;
+ }
virtual void destroy() {}
- int getBuffersDataSpace() { return 0; }
+ int getBuffersDataSpace() {
+ return 0;
+ }
protected:
virtual ~Surface() {}
@@ -89,15 +109,31 @@
*buffer = mBuffer.get();
return OK;
}
- virtual int cancelBuffer(ANativeWindowBuffer* buffer, int fenceFd) { return 0; }
- virtual int queueBuffer(ANativeWindowBuffer* buffer, int fenceFd) { return 0; }
- virtual int perform(int operation, va_list args) { return 0; }
- virtual int setSwapInterval(int interval) { return 0; }
- virtual int setBufferCount(int bufferCount) { return 0; }
+
+ virtual int cancelBuffer(ANativeWindowBuffer* buffer, int fenceFd) {
+ return 0;
+ }
+
+ virtual int queueBuffer(ANativeWindowBuffer* buffer, int fenceFd) {
+ return 0;
+ }
+
+ virtual int perform(int operation, va_list args) {
+ return 0;
+ }
+
+ virtual int setSwapInterval(int interval) {
+ return 0;
+ }
+
+ virtual int setBufferCount(int bufferCount) {
+ return 0;
+ }
private:
// can't be copied
Surface& operator=(const Surface& rhs);
+
Surface(const Surface& rhs);
const sp<IGraphicBufferProducer> mBufferProducer;
@@ -106,4 +142,4 @@
} // namespace android
-#endif // ANDROID_GUI_SURFACE_H
+#endif // ANDROID_GUI_SURFACE_H