History log of /haiku/src/servers/app/SystemPalette.cpp
Revision Date Author Comments
# 44e3766b 17-Nov-2021 Augustin Cavalier <waddlesplash@gmail.com>

app_server: Add casts to appease GCC 11 -Wclass-memaccess.


# 37b83b1a 22-Oct-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

The system palette was defined in two files. Moved to a private header,
included by the two.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22660 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16ed1e1d 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Removed headers/private/servers/app - everything is in src/servers/app now.
* Removed DisplaySupport.h, wasn't needed anymore.
* Removed private color set functions from InterfaceDefs.cpp - we might want
something similar, but definitely not like that.
* Minor cleanup, added some missing licenses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 758b1d0e 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 821426f6 16-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

forgot to remove debug output

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13699 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8ffa3fb9 05-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

the official system palette also has the 0xff entry (B_TRANSPARENT_MAGIC_CMAP8) with alpha = 0

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13474 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 359c905c 05-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

offscreen bitmaps work, tested on Haiku as well, supports all colorspaces that BBitmap::ImportBits() supports. It uses a fallback for non-B_RGB(A)32 bitmaps. Added support for B_SUB_PIXEL_PRECISION view flags, though it is a bit hacky, since I had to add it to LayerData, even though it is not a true part of stack data. Added Layer::SetFlags() to enforce code path and update fLayerData. Cleaned up DisplayDriverPainter and DisplayDriver API (changed some const BRect& rect to simply BRect rect in order to be able to reuse it in the code), moved Painter.h, the test environment only draws the changed part of the frame buffer again - this causes a lot less CPU overhead, Painter special cases stroke width of 1.0 to use square caps, which is similar to R5 implementation and removes a lot of problems with non-straight line drawing, ServerWindow uses the DisplayDriver from it's WinBorder instead of the one from the Desktop (needed for offscreen windows, which have their own DisplayDriverPainter), it also checks for GetRootLayer() == NULL, because offscreen layers are not attached to a RootLayer, there was a fix for scrolling which worked at least in the test environment, it is now defunced, because Adi moved _CopyBits to Layer... I need to reenable it later, LayerData has no more fEscapementDelta, also fixed fFontAliasing (which was thought to overriding the font flags, and now works as such again), Desktop initialises the menu_info and scroll_bar_info stuff, which makes ScrollBars work actually... hope I didn't forget something.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13448 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6deb7c67 14-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Documented the public methods, changed the file description

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13111 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d039af74 13-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Reverted to the previous algorithm, which is just another version of the same one: they produce slightly different results, but this one should be faster as it doesn't use divisions.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13097 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44bb3017 13-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Improved some more.
Why were the components or'ed with 5 ?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13096 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6ec6f3f8 13-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Better color distance-measuring algorithm, taken from here:
http://www.stud.uni-hannover.de/~michaelt/juggle/Algorithms.pdf.

Still not 100% identical to be's one, but much closer.
Small cleanups.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13091 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1f1ed1c6 13-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Generate the inversion map.
Note that the inversion_map and the index_map aren't the same as in Beos, due to bugs (or different behaviour) in color_distance.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13086 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 509db2a3 12-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Generate the index map using some code stolen from BBitmap. The Mandelbrot sample app starts looking good. Only the inversion map is missing now

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13079 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7475dcdf 07-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added an app server command to retrieve the color map. Made some adjustments to SystemPalette.cpp, implemented support for it in BPrivateScreen. Moved get_scs() a bit down to avoid a deadlock. Note that getting the colormap doesn't work due to port capacity limit (?)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12996 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33bbe223 24-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Moved app_server files to app/.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11972 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 37b83b1a2d32b92cb6e11a18ace276039b90bd2a 22-Oct-2007 Stefano Ceccherini <stefano.ceccherini@gmail.com>

The system palette was defined in two files. Moved to a private header,
included by the two.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22660 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 16ed1e1d15aac69c945890e5d5990bb41d9f4303 18-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Removed headers/private/servers/app - everything is in src/servers/app now.
* Removed DisplaySupport.h, wasn't needed anymore.
* Removed private color set functions from InterfaceDefs.cpp - we might want
something similar, but definitely not like that.
* Minor cleanup, added some missing licenses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 758b1d0e05fe1042cce6e00d194a147802d4f9be 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 821426f66ecdc09424d87668137446b3a0c2cbae 16-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

forgot to remove debug output

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13699 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8ffa3fb9fa0a51ed2edb8254800c65bd036f40a1 05-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

the official system palette also has the 0xff entry (B_TRANSPARENT_MAGIC_CMAP8) with alpha = 0

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13474 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 359c905c57c9d43ce84badcaef859fa94322897c 05-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

offscreen bitmaps work, tested on Haiku as well, supports all colorspaces that BBitmap::ImportBits() supports. It uses a fallback for non-B_RGB(A)32 bitmaps. Added support for B_SUB_PIXEL_PRECISION view flags, though it is a bit hacky, since I had to add it to LayerData, even though it is not a true part of stack data. Added Layer::SetFlags() to enforce code path and update fLayerData. Cleaned up DisplayDriverPainter and DisplayDriver API (changed some const BRect& rect to simply BRect rect in order to be able to reuse it in the code), moved Painter.h, the test environment only draws the changed part of the frame buffer again - this causes a lot less CPU overhead, Painter special cases stroke width of 1.0 to use square caps, which is similar to R5 implementation and removes a lot of problems with non-straight line drawing, ServerWindow uses the DisplayDriver from it's WinBorder instead of the one from the Desktop (needed for offscreen windows, which have their own DisplayDriverPainter), it also checks for GetRootLayer() == NULL, because offscreen layers are not attached to a RootLayer, there was a fix for scrolling which worked at least in the test environment, it is now defunced, because Adi moved _CopyBits to Layer... I need to reenable it later, LayerData has no more fEscapementDelta, also fixed fFontAliasing (which was thought to overriding the font flags, and now works as such again), Desktop initialises the menu_info and scroll_bar_info stuff, which makes ScrollBars work actually... hope I didn't forget something.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13448 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6deb7c67498f0022e6bd99ef754bc0d57c308c4f 14-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Documented the public methods, changed the file description

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13111 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d039af74697e68af191f5ab9b005c7bb7116cd5f 13-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Reverted to the previous algorithm, which is just another version of the same one: they produce slightly different results, but this one should be faster as it doesn't use divisions.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13097 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44bb3017740aeb2dd44e638e34fac935fd2628b4 13-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Improved some more.
Why were the components or'ed with 5 ?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13096 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6ec6f3f83119bf871f7746a02762d145feb1a31e 13-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Better color distance-measuring algorithm, taken from here:
http://www.stud.uni-hannover.de/~michaelt/juggle/Algorithms.pdf.

Still not 100% identical to be's one, but much closer.
Small cleanups.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13091 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1f1ed1c62ceaa02e1a39872b1dbf0157f395f130 13-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Generate the inversion map.
Note that the inversion_map and the index_map aren't the same as in Beos, due to bugs (or different behaviour) in color_distance.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13086 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 509db2a3181ea6d5c5c9e95fc3a9d7add85ab147 12-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Generate the index map using some code stolen from BBitmap. The Mandelbrot sample app starts looking good. Only the inversion map is missing now

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13079 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7475dcdf3a736a8e17b0d3fabe970a48661f7d83 07-Jun-2005 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Added an app server command to retrieve the color map. Made some adjustments to SystemPalette.cpp, implemented support for it in BPrivateScreen. Moved get_scs() a bit down to avoid a deadlock. Note that getting the colormap doesn't work due to port capacity limit (?)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12996 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 33bbe223914093509b4bc56bea8a90c81af80a37 24-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Moved app_server files to app/.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11972 a95241bf-73f2-0310-859d-f6bbb57e9c96