From dd78982d580aa61c39bfd13940140e5830f489b2 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 26 Nov 2018 16:28:07 -0800 Subject: minui: GRSurface::Create() computes data_size on its own. GRSurface::Create() doesn't need to rely on caller specifying the buffer size, as it can compute that info based on the given args. This CL also uses `size_t` for all the parameters in GRSurface::Create(). Test: Run recovery_unit_test on marlin. Test: Build and boot into blueline recovery. `Run graphics test`. Test: Build and boot into blueline charger mode. Change-Id: Idec9381079196abf13553a475006fefcfca10950 --- minui/graphics_drm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'minui/graphics_drm.h') diff --git a/minui/graphics_drm.h b/minui/graphics_drm.h index 6ba46e60b..57ba39b83 100644 --- a/minui/graphics_drm.h +++ b/minui/graphics_drm.h @@ -16,6 +16,7 @@ #pragma once +#include #include #include @@ -39,7 +40,8 @@ class GRSurfaceDrm : public GRSurface { private: friend class MinuiBackendDrm; - GRSurfaceDrm(int width, int height, int row_bytes, int pixel_bytes, int drm_fd, uint32_t handle) + GRSurfaceDrm(size_t width, size_t height, size_t row_bytes, size_t pixel_bytes, int drm_fd, + uint32_t handle) : GRSurface(width, height, row_bytes, pixel_bytes), drm_fd_(drm_fd), handle(handle) {} const int drm_fd_; -- cgit v1.2.3