mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-27 16:22:20 +01:00
Merge current dev and refresh PR #6741 from the 7011 integration
This commit is contained in:
@@ -57,6 +57,16 @@ def test_moves_share_pixels_but_keep_independent_offsets_and_changed_pixels():
|
||||
assert run_node(script) == {"count": 20, "bytes": 400, "first": 0, "last": 19, "shared": True, "changed": True}
|
||||
|
||||
|
||||
def test_moves_share_pixels_with_a_four_byte_comparison():
|
||||
# The pixel comparison runs over every byte of every layer on each undo
|
||||
# snapshot; comparing Uint32 words keeps pen/selection commits fast.
|
||||
source = (ROOT / "static/js/editor/history-budget.js").read_text(encoding="utf-8")
|
||||
assert "function samePixels(image, other) {" in source
|
||||
assert "new Uint32Array(image.data.buffer, image.data.byteOffset, length >> 2)" in source
|
||||
assert "new Uint32Array(other.data.buffer, other.data.byteOffset, length >> 2)" in source
|
||||
assert "candidates.find(other => samePixels(image, other))" in source
|
||||
|
||||
|
||||
def test_history_budget_counts_saved_selections_and_group_masks():
|
||||
script = textwrap.dedent(
|
||||
f"""
|
||||
|
||||
Reference in New Issue
Block a user