summaryrefslogtreecommitdiffstats
path: root/minui/graphics_adf.h
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-10-21 21:12:37 +0200
committerTao Bao <tbao@google.com>2018-10-23 03:18:02 +0200
commit92bdb5a38964baf8326a7d6f53926c30e250922c (patch)
tree23421d8b4d4bb98f9f8e0cfc20ec08889a14d22f /minui/graphics_adf.h
parentMerge "Fix instrumentation_for to refer to name of module" (diff)
downloadandroid_bootable_recovery-92bdb5a38964baf8326a7d6f53926c30e250922c.tar
android_bootable_recovery-92bdb5a38964baf8326a7d6f53926c30e250922c.tar.gz
android_bootable_recovery-92bdb5a38964baf8326a7d6f53926c30e250922c.tar.bz2
android_bootable_recovery-92bdb5a38964baf8326a7d6f53926c30e250922c.tar.lz
android_bootable_recovery-92bdb5a38964baf8326a7d6f53926c30e250922c.tar.xz
android_bootable_recovery-92bdb5a38964baf8326a7d6f53926c30e250922c.tar.zst
android_bootable_recovery-92bdb5a38964baf8326a7d6f53926c30e250922c.zip
Diffstat (limited to 'minui/graphics_adf.h')
-rw-r--r--minui/graphics_adf.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/minui/graphics_adf.h b/minui/graphics_adf.h
index 2f019ed0b..099d32962 100644
--- a/minui/graphics_adf.h
+++ b/minui/graphics_adf.h
@@ -14,21 +14,30 @@
* limitations under the License.
*/
-#ifndef _GRAPHICS_ADF_H_
-#define _GRAPHICS_ADF_H_
+#pragma once
+
+#include <stdint.h>
#include <adf/adf.h>
#include "graphics.h"
+#include "minui/minui.h"
class GRSurfaceAdf : public GRSurface {
+ public:
+ uint8_t* data() override {
+ return mmapped_buffer_;
+ }
+
private:
+ friend class MinuiBackendAdf;
+
int fence_fd;
int fd;
__u32 offset;
__u32 pitch;
- friend class MinuiBackendAdf;
+ uint8_t* mmapped_buffer_{ nullptr };
};
class MinuiBackendAdf : public MinuiBackend {
@@ -54,5 +63,3 @@ class MinuiBackendAdf : public MinuiBackend {
unsigned int n_surfaces;
GRSurfaceAdf surfaces[2];
};
-
-#endif // _GRAPHICS_ADF_H_