#
3ca2e85b |
|
24-May-2019 |
Augustin Cavalier <waddlesplash@gmail.com> |
Interface: Add casts to memcpy/memset invocations on BPoint & BRect. Their copy constructors are exactly what GCC would generate, but we can't remove them because doing so would make them trivially copyable, and so they would be passed in registers on x86_64, an ABI breakage. So instead we have to add explicit casts to void* here.
|
#
9216fc01 |
|
18-Jun-2018 |
Augustin Cavalier <waddlesplash@gmail.com> |
More class/struct mixup fixes. Spotted by Clang.
|
#
b54b3ae5 |
|
13-Nov-2015 |
Julian Harnath <julian.harnath@rwth-aachen.de> |
app_server: add a cache for AlphaMasks * If the same shape alpha mask is set again and again, we now keep the rendered masks in a cache. On certain websites, WebKit sets the same shape for clipping hundreds of times, which uses a lot of time to render the masks. * When a shape mask was generated, we put it into AlphaMaskCache. The constructor for ShapeAlphaMask is made private and a factory method is used for instantiation instead, which transparently looks up in the cache whether a suitable mask was already generated before (so the entire caching is encapsulated inside the AlphaMask class). * When taking a mask out of the cache, we still create a new AlphaMask instance. However, the new instance will share the mask bitmap with the previously generated instance (aside from the rendering of their bitmap, AlphaMask instances are pretty lightweight). Shape masks are only seen as identical when their shape is the same, the inverse flag, and they have the same parent mask. * Cache is limited to a fixed size of currently 8 MiB, using a simple random replacement scheme. An LRU scheme can be added in the future if necessary. Counting of bytes for the cache size includes parent masks of masks in the cache, even if the parent itself is not cached. A reference counter for "indirect" cache references keeps track of which masks are not part of the cache, but still need to be added to the cache byte size. * For now, only for ShapeAlphaMasks, other mask types can be added as necessary.
|
#
ab120936 |
|
09-Nov-2015 |
Julian Harnath <julian.harnath@rwth-aachen.de> |
BShape: move bounding box method to shape_data * Makes it easier to get the bounding box from inside app_server
|
#
db1ef05a |
|
14-Jul-2014 |
John Scipione <jscipione@gmail.com> |
BShape: Style fixes for docs
|
#
76ab3f88 |
|
18-Mar-2010 |
Stephan Aßmus <superstippi@gmx.de> |
Basically, this changeset implements BShape::ArcTo(). In more detail: * Added BShape::ArcTo() and BShapeIterator::IterateArcTo(), using a previously unused virtual slot. (Added the symbols for binary compatibility for GCC2 and GCC4.) * Added operator=(), operator==() and operator!=() to BShape. * Added BShape::BezierTo() version taking three points, which is sometimes more convenient. * Added the four new shape data ops OP_LARGE_ARC_TO_CW, OP_LARGE_ARC_TO_CCW, OP_SMALL_ARC_TO_CW and OP_SMALL_ARC_TO_CCW. For a single arc, provided the radius is large enough, there are four possibilities to draw the arc, these are controlled by the two boolean flags to ArcTo() and mapped to the new commands accordingly. * Some style cleanup in Shape.cpp (sorry for mixing it up, but it gets worse below...) * Added ShapeTest to src/tests/servers/app. * Changed the way BShapes are transformed from view to screen space in the app_server. For arcs, it would be nontrivial to apply a proper transformation, it's much easier to let AGG take care of it. This affects ServerPicture as well. * Wrapped iterating the BShape into try/catch blocks in ShapeIterator. But I really don't understand the purpose of the class in the first place. Maybe it can now be dropped, since coordinates don't have to be transformed in place anymore. * Refactored copy&paste shape iteration code in Painter. The transformation to screen space happens there. * Since RemoteDrawingEngine needed to be adopted anyway, I also updated it for the new DrawString() with offsets version. But the client still needs to be adapted. * Style cleanup in Painter.h git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35905 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f591e3a0 |
|
17-Aug-2007 |
Stephan Aßmus <superstippi@gmx.de> |
* fix weird Shape op/point allocation * handle out of memory situations * don't try to copy (and assign op!) in SetData if opCount/ptCount is 0 -> FontDemo doesn't crash anymore eventually when cycling fonts in outline mode git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22000 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2f9eca85 |
|
30-Oct-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
moved Shape related defines to their own header git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19154 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
db1ef05aef84288fef063a72b73676f6cdf61ee4 |
|
14-Jul-2014 |
John Scipione <jscipione@gmail.com> |
BShape: Style fixes for docs
|
#
76ab3f88df26cbb595ca663798c7d84f9758c7c4 |
|
18-Mar-2010 |
Stephan Aßmus <superstippi@gmx.de> |
Basically, this changeset implements BShape::ArcTo(). In more detail: * Added BShape::ArcTo() and BShapeIterator::IterateArcTo(), using a previously unused virtual slot. (Added the symbols for binary compatibility for GCC2 and GCC4.) * Added operator=(), operator==() and operator!=() to BShape. * Added BShape::BezierTo() version taking three points, which is sometimes more convenient. * Added the four new shape data ops OP_LARGE_ARC_TO_CW, OP_LARGE_ARC_TO_CCW, OP_SMALL_ARC_TO_CW and OP_SMALL_ARC_TO_CCW. For a single arc, provided the radius is large enough, there are four possibilities to draw the arc, these are controlled by the two boolean flags to ArcTo() and mapped to the new commands accordingly. * Some style cleanup in Shape.cpp (sorry for mixing it up, but it gets worse below...) * Added ShapeTest to src/tests/servers/app. * Changed the way BShapes are transformed from view to screen space in the app_server. For arcs, it would be nontrivial to apply a proper transformation, it's much easier to let AGG take care of it. This affects ServerPicture as well. * Wrapped iterating the BShape into try/catch blocks in ShapeIterator. But I really don't understand the purpose of the class in the first place. Maybe it can now be dropped, since coordinates don't have to be transformed in place anymore. * Refactored copy&paste shape iteration code in Painter. The transformation to screen space happens there. * Since RemoteDrawingEngine needed to be adopted anyway, I also updated it for the new DrawString() with offsets version. But the client still needs to be adapted. * Style cleanup in Painter.h git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35905 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f591e3a0f272539a6e6176ad609922a261eff587 |
|
17-Aug-2007 |
Stephan Aßmus <superstippi@gmx.de> |
* fix weird Shape op/point allocation * handle out of memory situations * don't try to copy (and assign op!) in SetData if opCount/ptCount is 0 -> FontDemo doesn't crash anymore eventually when cycling fonts in outline mode git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22000 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2f9eca855a65581e353ad28a0d71b4f48893ac01 |
|
30-Oct-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
moved Shape related defines to their own header git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19154 a95241bf-73f2-0310-859d-f6bbb57e9c96
|