ghaerr / ghaerr/microwindows

GrCopyArea all 0s

Open
#61 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
858
Forks
112
Avg merge
1d 13h
Merged PRs (30d)
4

Description

Hi, I have an embedded Linux application that was previously using Microwin v0.91 (2005) and running on an old Arm CPU.
Now I'm porting the project to a new system (i.MX6 UL, armv7l) using the latest version of microwin.
My source code is well tested (>15 years of life) and was previously running without issues.

I have spent a few days adjusting the build config for this new system and the graphic library works as expected, APART from an issue that can be troublesome. We draw popups on our display and we need to backup the raster below the popup with GrCopyArea and restore it back after the popup gets deleted. Unfortunately, GrCopyArea seems not to work: it copies 0s to the raster when we try to restore the area below the popup, therefore after the popup is deleted we get a black spot below it.

I have debugged this and can't find anything wrong (from my little understanding of microwin guts). I reached one of the low level functions (rasteropGeneralLow) and can't see anything wrong (like a failed assert, a return before really copying the data, etc). The only thing I noticed is that the source and dest pitch are different: src pitch 8, dst pitch 16
What could be wrong?

The display is 1 bit only (the pixels can be on/off). These are some of the important fields in the config file:

SCREEN_PIXTYPE           = MWPF_PALETTE
SCREEN_DEPTH             = 1

SCREEN                   = FB

SCREEN_WIDTH             = 128
SCREEN_HEIGHT            = 64

MICROWIN                 = N
NANOX                    = Y
NUKLEARUI                = N
NX11                     = N
ENGINE                   = N
TINYWIDGETS              = N

LINK_APP_INTO_SERVER     = Y

HAVE_SHAREDMEM_SUPPORT   = Y

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the GrCopyArea call and follow it into rasteropGeneralLow, using the reported 1-bit framebuffer configuration and the source pitch 8 versus destination pitch 16 as reproduction details. Reproduce the popup backup and restore on the i.MX6 UL setup, then verify that the raster beneath the popup is restored instead of filled with zeroes.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
computer-graphics, embedded-iot, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.