[haiku-bugs] [Haiku] #12326: Archiving a BBitmap does not always save image data

  • From: "Pete" <trac@xxxxxxxxxxxx>
  • Date: Sun, 23 Aug 2015 20:36:39 -0000

#12326: Archiving a BBitmap does not always save image data
-----------------------+------------------------------
Reporter: Pete | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: - General | Version: R1/Development
Keywords: | Blocked By:
Blocking: | Has a Patch: 0
Platform: All |
-----------------------+------------------------------
In BeOS, the image data of a BBitmap was always saved when it was
archived, whether the "deep" flag was true or false. Haiku currently only
saves the image if "deep" is true.

This seems faulty logic, as the intent of archiving is almost invariably
to save the image! I can't imagine where one would want to save a bitmap
without its image. According to the docs, the "deep" flag is meant to
control archiving of attached views; the image data is not a view, though,
but part of the bitmap.

"Deep" is true by default, so the disparity doesn't normally cause
problems, but it did when porting Sequitur. It uses archived bitmaps for
(some) icons, and these were showing up blank. Turned out the deep flag
was explicitly being set false. There was no apparent need for this in
this case, so it was easily fixed, but I can see it causing worse problems
in other cases.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12326>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts:

  • » [haiku-bugs] [Haiku] #12326: Archiving a BBitmap does not always save image data - Pete