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
diff --git a/screen_ui.cpp b/screen_ui.cpp
index ed71888..765d2fe 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -282,14 +282,14 @@
}
if (surface->pixel_bytes != 1 || surface->width != surface->row_bytes) {
- fprintf(stderr, "Invalid graphic surface, pixel bytes: %d, width: %d row_bytes: %d",
+ fprintf(stderr, "Invalid graphic surface, pixel bytes: %zu, width: %zu row_bytes: %zu",
surface->pixel_bytes, surface->width, surface->row_bytes);
return false;
}
if (surface->width > max_width || surface->height > max_height - y) {
fprintf(stderr,
- "Graphic surface doesn't fit into the screen. width: %d, height: %d, max_width: %zu,"
+ "Graphic surface doesn't fit into the screen. width: %zu, height: %zu, max_width: %zu,"
" max_height: %zu, vertical offset: %d\n",
surface->width, surface->height, max_width, max_height, y);
return false;