diff options
author | Tao Bao <tbao@google.com> | 2018-10-23 19:06:35 +0200 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-10-23 19:06:35 +0200 |
commit | 66a576b79c6cf629c439f02a37b824a1ec35ec19 (patch) | |
tree | 516cc6ee57b32a0354a9895e85d7238e6496b7fd /minui/graphics_adf.h | |
parent | Merge "Recovery now expects public keys in zipfile" (diff) | |
parent | minui: Move GRSurface into a class. (diff) | |
download | android_bootable_recovery-66a576b79c6cf629c439f02a37b824a1ec35ec19.tar android_bootable_recovery-66a576b79c6cf629c439f02a37b824a1ec35ec19.tar.gz android_bootable_recovery-66a576b79c6cf629c439f02a37b824a1ec35ec19.tar.bz2 android_bootable_recovery-66a576b79c6cf629c439f02a37b824a1ec35ec19.tar.lz android_bootable_recovery-66a576b79c6cf629c439f02a37b824a1ec35ec19.tar.xz android_bootable_recovery-66a576b79c6cf629c439f02a37b824a1ec35ec19.tar.zst android_bootable_recovery-66a576b79c6cf629c439f02a37b824a1ec35ec19.zip |
Diffstat (limited to 'minui/graphics_adf.h')
-rw-r--r-- | minui/graphics_adf.h | 17 |
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_ |