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 --- vr_ui.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vr_ui.h') diff --git a/vr_ui.h b/vr_ui.h index 63c0f2465..2e8ac5921 100644 --- a/vr_ui.h +++ b/vr_ui.h @@ -33,11 +33,12 @@ class VrRecoveryUI : public ScreenRecoveryUI { int ScreenWidth() const override; int ScreenHeight() const override; - void DrawSurface(GRSurface* surface, int sx, int sy, int w, int h, int dx, int dy) const override; + void DrawSurface(const GRSurface* surface, int sx, int sy, int w, int h, int dx, + int dy) const override; int DrawHorizontalRule(int y) const override; void DrawHighlightBar(int x, int y, int width, int height) const override; void DrawFill(int x, int y, int w, int h) const override; - void DrawTextIcon(int x, int y, GRSurface* surface) const override; + void DrawTextIcon(int x, int y, const GRSurface* surface) const override; int DrawTextLine(int x, int y, const std::string& line, bool bold) const override; }; -- cgit v1.2.3