After some sleep, this looks good to me now. This is also much closer to what the code looked like before I wrote combine_image_by_layout().

For the future, I wonder, should we normalize the "UI" layout to something where we can make better assumptions? e.g. sort the regions, merge overlapping/directly following regions and fill gaps with non-included regions

View Change

To view, visit change 30370. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I44e0cea621f2a3d4dc70fa7e93c52ed95e54014a
Gerrit-Change-Number: 30370
Gerrit-PatchSet: 3
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Comment-Date: Sat, 22 Dec 2018 12:53:58 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment