mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-09-30 19:33:49 +08:00
convert framebuffer to class (#19800)
* class FrameBuffer * fix build error * remove bootlog
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user