From 65815b6d3a67cf07a01f28fb9ecb7bf05049754b Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 23 Oct 2018 10:54:02 -0700 Subject: ui: Add constness to Draw- functions. These functions take the given GRSurface instances as inputs, which shouldn't be altered. Test: mmma -j bootable/recovery Test: Run recovery_unit_test. Test: `Run graphics test` on marlin. Change-Id: I51bf408e85faae2b497d4f148ab1dec22dd16c93 --- screen_ui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'screen_ui.cpp') diff --git a/screen_ui.cpp b/screen_ui.cpp index 181d58ecf..9162bcb58 100644 --- a/screen_ui.cpp +++ b/screen_ui.cpp @@ -600,7 +600,7 @@ int ScreenRecoveryUI::ScreenHeight() const { return gr_fb_height(); } -void ScreenRecoveryUI::DrawSurface(GRSurface* surface, int sx, int sy, int w, int h, int dx, +void ScreenRecoveryUI::DrawSurface(const GRSurface* surface, int sx, int sy, int w, int h, int dx, int dy) const { gr_blit(surface, sx, sy, w, h, dx, dy); } @@ -618,7 +618,7 @@ void ScreenRecoveryUI::DrawFill(int x, int y, int w, int h) const { gr_fill(x, y, w, h); } -void ScreenRecoveryUI::DrawTextIcon(int x, int y, GRSurface* surface) const { +void ScreenRecoveryUI::DrawTextIcon(int x, int y, const GRSurface* surface) const { gr_texticon(x, y, surface); } -- cgit v1.2.3