Refactor bitmap update methods to remove unnecessary parameters; simplify texture updating in Renderer and Bitmap classes

This commit is contained in:
scawful
2024-11-13 09:16:16 -05:00
parent 8e8b3ed2f7
commit 7798d769a5
5 changed files with 11 additions and 30 deletions

View File

@@ -294,7 +294,7 @@ absl::Status GraphicsEditor::UpdateGfxTabView() {
auto draw_tile_event = [&]() {
current_sheet_canvas_.DrawTileOnBitmap(tile_size_, &current_bitmap,
current_color_);
Renderer::GetInstance().UpdateBitmap(&current_bitmap, true);
Renderer::GetInstance().UpdateBitmap(&current_bitmap);
};
current_sheet_canvas_.UpdateColorPainter(
@@ -373,7 +373,7 @@ absl::Status GraphicsEditor::UpdatePaletteColumn() {
->data()[current_sheet_]
.ApplyPaletteWithTransparent(palette, edit_palette_sub_index_));
Renderer::GetInstance().UpdateBitmap(
&rom()->mutable_gfx_sheets()->data()[current_sheet_], true);
&rom()->mutable_gfx_sheets()->data()[current_sheet_]);
refresh_graphics_ = false;
}
}