mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-09-30 11:33:41 +08:00
Merge branch 'upstream/openpilot/master' into sync-20260401
# Conflicts: # .github/workflows/auto_pr_review.yaml # .github/workflows/repo-maintenance.yaml # README.md # SConstruct # docs/CARS.md # opendbc_repo # panda # selfdrive/car/card.py # selfdrive/controls/controlsd.py # selfdrive/selfdrived/selfdrived.py # selfdrive/test/process_replay/migration.py # selfdrive/ui/translations/app_fr.po Platform List: sync with latest Sync: `commaai/panda:master` → `sunnypilot/panda:master`
This commit is contained in:
@@ -457,6 +457,11 @@ class GuiApplication(GuiApplicationExt):
|
||||
|
||||
def texture(self, asset_path: str, width: int | None = None, height: int | None = None,
|
||||
alpha_premultiply=False, keep_aspect_ratio=True, flip_x: bool = False) -> rl.Texture:
|
||||
if width is not None:
|
||||
width = round(width)
|
||||
if height is not None:
|
||||
height = round(height)
|
||||
|
||||
cache_key = f"{asset_path}_{width}_{height}_{alpha_premultiply}_{keep_aspect_ratio}_{flip_x}"
|
||||
if cache_key in self._textures:
|
||||
return self._textures[cache_key]
|
||||
|
||||
Reference in New Issue
Block a user