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
This commit is contained in:
@@ -34,13 +34,13 @@ int VrRecoveryUI::ScreenHeight() const {
|
||||
return gr_fb_height();
|
||||
}
|
||||
|
||||
void VrRecoveryUI::DrawSurface(GRSurface* surface, int sx, int sy, int w, int h, int dx,
|
||||
void VrRecoveryUI::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 + stereo_offset_, dy);
|
||||
gr_blit(surface, sx, sy, w, h, dx - stereo_offset_ + ScreenWidth(), dy);
|
||||
}
|
||||
|
||||
void VrRecoveryUI::DrawTextIcon(int x, int y, GRSurface* surface) const {
|
||||
void VrRecoveryUI::DrawTextIcon(int x, int y, const GRSurface* surface) const {
|
||||
gr_texticon(x + stereo_offset_, y, surface);
|
||||
gr_texticon(x - stereo_offset_ + ScreenWidth(), y, surface);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user