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_fbdev.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'minui/graphics_fbdev.h') diff --git a/minui/graphics_fbdev.h b/minui/graphics_fbdev.h index 016ab88bc..596ba74ea 100644 --- a/minui/graphics_fbdev.h +++ b/minui/graphics_fbdev.h @@ -17,6 +17,7 @@ #pragma once #include +#include #include #include @@ -30,8 +31,8 @@ class GRSurfaceFbdev : public GRSurface { public: // Creates and returns a GRSurfaceFbdev instance, or nullptr on error. - static std::unique_ptr Create(int width, int height, int row_bytes, - int pixel_bytes); + static std::unique_ptr Create(size_t width, size_t height, size_t row_bytes, + size_t pixel_bytes); uint8_t* data() override { return buffer_; -- cgit v1.2.3