60 lines
2.8 KiB
Markdown
60 lines
2.8 KiB
Markdown
|
|
# Merge Upstream PRs #965, #939, #852, #972, #971, #977, #975
|
||
|
|
|
||
|
|
**Date:** 2026-02-18
|
||
|
|
**Branch:** mod/merge-upstream-1
|
||
|
|
|
||
|
|
## Task
|
||
|
|
|
||
|
|
Port 7 upstream PRs from crosspoint-reader/crosspoint-reader into the mod branch.
|
||
|
|
|
||
|
|
## Status per PR
|
||
|
|
|
||
|
|
| PR | Description | Result |
|
||
|
|
|---|---|---|
|
||
|
|
| #939 | Fix dangling pointer in MyLibraryActivity | Already ported, no changes needed |
|
||
|
|
| #852 | HalPowerManager idle CPU freq scaling | Completed partial port (Lock RAII, WiFi check, skipLoopDelay, render locks) |
|
||
|
|
| #965 | Fix paragraph formatting inside list items | Fully ported |
|
||
|
|
| #972 | Micro-optimizations to eliminate value copies | Ported (fontMap move, getDataFromBook const ref) |
|
||
|
|
| #971 | Remove redundant hasPrintableChars pass | Fully ported |
|
||
|
|
| #977 | Skip unsupported image formats during parsing | Fully ported |
|
||
|
|
| #975 | Fix UITheme memory leak on theme reload | Fully ported |
|
||
|
|
|
||
|
|
## Changes Made
|
||
|
|
|
||
|
|
### PR #852 (partial port completion)
|
||
|
|
- `lib/hal/HalPowerManager.h` -- Added `LockMode` enum, `currentLockMode`/`modeMutex` members, nested `Lock` RAII class (non-copyable/non-movable), `extern powerManager` declaration
|
||
|
|
- `lib/hal/HalPowerManager.cpp` -- Added mutex init in `begin()`, WiFi.getMode() check in `setPowerSaving()`, Lock constructor/destructor, LockMode guard
|
||
|
|
- `src/activities/settings/ClearCacheActivity.h` -- Added `skipLoopDelay()` override
|
||
|
|
- `src/activities/settings/OtaUpdateActivity.h` -- Added `skipLoopDelay()` override
|
||
|
|
- `src/activities/Activity.cpp` -- Added `HalPowerManager::Lock` in `renderTaskLoop()`
|
||
|
|
- `src/activities/ActivityWithSubactivity.cpp` -- Added `HalPowerManager::Lock` in `renderTaskLoop()`
|
||
|
|
|
||
|
|
### PR #965
|
||
|
|
- `lib/Epub/Epub/parsers/ChapterHtmlSlimParser.h` -- Added `listItemUntilDepth` member
|
||
|
|
- `lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp` -- Modified `startElement` to handle `<p>` inside `<li>` without line break; added depth reset in `endElement`
|
||
|
|
|
||
|
|
### PR #972
|
||
|
|
- `lib/GfxRenderer/GfxRenderer.cpp` -- `std::move(font)` in `insertFont`
|
||
|
|
- `src/RecentBooksStore.h` / `.cpp` -- `getDataFromBook` now takes `const std::string&`
|
||
|
|
|
||
|
|
### PR #971
|
||
|
|
- `lib/EpdFont/EpdFont.h` / `.cpp` -- Removed `hasPrintableChars` method
|
||
|
|
- `lib/EpdFont/EpdFontFamily.h` / `.cpp` -- Removed `hasPrintableChars` method
|
||
|
|
- `lib/GfxRenderer/GfxRenderer.cpp` -- Removed 3 early-return guards calling `hasPrintableChars`
|
||
|
|
|
||
|
|
### PR #977
|
||
|
|
- `lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp` -- Added `PARSE_BUFFER_SIZE` constant, `isFormatSupported` guard before image extraction, timing instrumentation
|
||
|
|
|
||
|
|
### PR #975
|
||
|
|
- `src/components/UITheme.h` -- Changed `currentTheme` to `std::unique_ptr<const BaseTheme>`
|
||
|
|
- `src/components/UITheme.cpp` -- Changed allocations to `std::make_unique`
|
||
|
|
|
||
|
|
## Build Result
|
||
|
|
|
||
|
|
Build succeeded: RAM 31.1%, Flash 99.5%
|
||
|
|
|
||
|
|
## Follow-up Items
|
||
|
|
|
||
|
|
- PR #972 LyraTheme loop variable change not applicable (our code uses index-based loops)
|
||
|
|
- Test on device to verify all changes work as expected
|