Closed Bug 999264 Opened 6 years ago Closed 6 years ago

the gallery editor preview might becomes black suddenly when turn on the screen


(Core :: Graphics, defect)

Gonk (Firefox OS)
Not set





(Reporter: jerry, Unassigned)



(Whiteboard: [sprd303701])


(3 files)

James, I move the gallery preview problem into this bug.
Could you update the dependent list in bug 994590?
Flags: needinfo?(james.zhang)
Attached image test image
the patch for testing the black preview issue.

1.dump graphic buffer the EGLImage
If I turn on the screen and see the preview becomes black, I can let the preview back by the re-binding the original EGLImage.
Furthermore, if I dump the graphic buffer when the preview is black, I can see the raw data is correct.

Testing step:
device: tarako
gecko: 1.3T commit 20474756dff9026cf37dfd2daea96df672292391
gaia: 1.3T commit 3de37f050000b206c6bf8962e1582d93fde742c4

1. apply the gecko patch attachment 8409978 [details] [diff] [review]
2. put test image attachment 8409976 [details] to device /sdcard folder
	a.adb push 256.jpg /sdcard
3. launch gallery and enter editor mode for the 256.jpg 
3. turn off the screen
4. wait for 4 second
5. turn on the screen
6. if the gallery is not killed by OOM, you might see the preview suddenly becomes black.
7. dump the raw data in graphic buffer
	a. adb shell "mkdir /sdcard/debug"	#create a folder to save the raw file
	b. adb shell "setprop test.dump_buf 1"	#dump raw file to /sdcard/debug folder
	c. adb pull /sdcard/debug		#pull all raw file back
8. re-bind EGLImage
	a. adb shell "setprop test.upload 1"	#re-bind the original EGLImage
9. after re-binding EGLImage, the preview is back.
Depends on: 994590
Flags: needinfo?(james.zhang)
Whiteboard: [sprd303701]
When the screen is black, We can call gl()->fEGLImageTargetTexture2D() again to let the preview back.

b2g call gl()->fEGLImageTargetTexture2D() at [1].
We don't need to call gl()->fEGLImageTargetTexture2D() for every screen on/off.
It is just be used for every "new graphic data(or screen data)".

The data in graphic buffer is also correct.
So we have problem in gl texture binding. We might have problem in GL driver.

And I can't reproduce this issue on helix device with the same gecko and gaia revision as comment 5.
Jerry, please see bug 1012551, it has 100% reproduce rate and we must fix it.
Closed: 6 years ago
Flags: needinfo?(hshih)
Resolution: --- → DUPLICATE
Duplicate of bug: 1012551
(In reply to Jerry Shih[:jerry] from comment #7)
> And I can't reproduce this issue on helix device with the same gecko and
> gaia revision as comment 5.

Helix use qcom Adreno and tarako use ARM mali. Maybe there is GPU compatibility issue.
Flags: needinfo?(hshih)
You need to log in before you can comment on or make changes to this bug.