Skip to content
This repository was archived by the owner on Aug 8, 2022. It is now read-only.

Fix bug in diff generator#218

Merged
DanielJette merged 3 commits intomasterfrom
fix-diff
May 16, 2021
Merged

Fix bug in diff generator#218
DanielJette merged 3 commits intomasterfrom
fix-diff

Conversation

@DanielJette
Copy link
Copy Markdown
Contributor

@DanielJette DanielJette commented Apr 22, 2021

What does this change accomplish?

Resolves #215

I noticed a bug where the parallel processor was writing pixels to effectively random locations.

image

How have you achieved it?

Use put with index for parallel pixel processor transform function. The existing code only worked for sequential (single-core) operations. We must store the transformed pixel in the right location using the put method that takes a destination index. The other version just writes the values sequentially.

Tophat instructions

  1. Run ScreenshotRuleExampleTests.generateDiffs
  2. Pull screenshots from the device (./gradlew screenshotPull)
  3. Verify that ScreenshotRuleExampleTests_generateDiffs.diff.png looks like what is expected

Notice

This change must keep master in a shippable state; it may be shipped without further notice.

@DanielJette DanielJette merged commit 00846dd into master May 16, 2021
@DanielJette DanielJette deleted the fix-diff branch May 16, 2021 14:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ParallelPixelProcessor.kt:90 - java.lang.IndexOutOfBoundsException: index=315250 out of bounds (limit=315250)

2 participants