convert framebuffer to class (#19800)

* class FrameBuffer

* fix build error

* remove bootlog
This commit is contained in:
Dean Lee
2021-01-28 21:47:05 +08:00
committed by GitHub
parent 4f995b35d5
commit 6583206ed4
9 changed files with 39 additions and 34 deletions
+12 -7
View File
@@ -1,13 +1,7 @@
#pragma once
typedef struct FramebufferState FramebufferState;
#include <cstdlib>
FramebufferState* framebuffer_init(
const char* name, int32_t layer, int alpha,
int *out_w, int *out_h);
void framebuffer_set_power(FramebufferState *s, int mode);
void framebuffer_swap(FramebufferState *s);
bool set_brightness(int brightness);
/* Display power modes */
@@ -35,3 +29,14 @@ enum {
* functionality. */
HWC_POWER_MODE_DOZE_SUSPEND = 3,
};
struct FramebufferState;
class FrameBuffer {
public:
FrameBuffer(const char *name, uint32_t layer, int alpha, int *out_w, int *out_h);
~FrameBuffer();
void set_power(int mode);
void swap();
private:
FramebufferState *s;
};