1

we have a UI display issue when used directfb to display the youtube UI, so is there a way to dump the original content data on the directfb surface from cobalt to check whether it's right? The cobalt version is rc_11.95853.

enter image description here

enter image description here

enter image description here

bitchainer
  • 535
  • 2
  • 19

1 Answers1

1

There is no built-in function for explicitly dumping original content data, but you can annotate your SbBlitterCreateSurfaceFromPixelData() implementation to dump the input data to a file for analysis. SbBlitterCreateSurfaceFromPixelData() will be called once for each surface, and is the path taken for the cached text surfaces that you highlight in your screenshot. I hope this helps.

Andrew Top
  • 2,517
  • 1
  • 17
  • 10
  • hi andrew, we dumped the data in the directfb surface as you suggested, the size is too small, and we used the xnview to view the pictrues, it's messing, so how why the dumped picture size is too small and display not right? – bitchainer Sep 21 '17 at 02:00
  • Hi bitchainer, after a quick look at your code, it looks as though you are using "pitch_in_bytes" as the size. "pitch_in_bytes" is actually the length of a single row of pixel data (in bytes), so the full image size (in bytes) will actually be "pitch_in_bytes * height". Each pixel should contain four bytes, probably in the format RGBA (but it may be another ordering, I'm not at my workstation right now to be able to properly check). Let me know if this helps. – Andrew Top Sep 23 '17 at 15:08