#
85b82f85 |
|
19-Jul-2022 |
Dale Cieslak <dcieslak@yahoo.com> |
BFont: allow loading of user fonts from disk or memory This patch adds an API call to BFont, called LoadFont, that takes a string path to a font file. The user fonts are managed via a new class called AppFontManager that inherits from the base class FontManagerBase but adds the methods to add and remove user fonts from disk or memory. There is also a new method called UnloadFont to remove a user font, but on exit of an app all user fonts should be automatically cleaned up. Global/system fonts are managed by the GlobalFontManager, which is a new class that also inherits from the base class FontManagerBase, replacing the old "FontManager" class. A maximum of 128 user fonts may be loaded, and memory fonts may not exceed 20MB. There's also an overloaded version of LoadFont that accepts an area_id and loads the font from memory. A size and offset may optionally be provided to allow for an area that contains more than just a font. Change-Id: I6add42bdf0c0cefc0e2e2a4984fd848c3e7269e5 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4790 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
#
06ed32b8 |
|
05-Oct-2020 |
Jérôme Duval <jerome.duval@gmail.com> |
BCursor: add a constructor with bitmap and point * enhancement #15169 * get_mouse_bitmap(): also reads the colorspace from app_server. * docs and tests Change-Id: Iba63f8a2789530ae596c30b92f14828f31761d98 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3292 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
edfd1a7b |
|
24-Nov-2019 |
Andrej Antunovikj <tunas@cryptolab.net> |
Fixed minor typo in ProfileMessageSupport Change-Id: I3ce60d4a9a1bb43bdec73ee2baebe8348a1de9b1 Reviewed-on: https://review.haiku-os.org/c/haiku/+/1974 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
cc7e3a05 |
|
24-Nov-2019 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
app_server: fix another unchecked out-of-memory case BString initialization can fail, even when it's allocated on the stack. Use a const char* to make this code simpler. We lose the ability to differenciate unknown opcodes, but these should not happen, or the function should be extended to handle them all.
|
#
3a2b67b5 |
|
21-Nov-2017 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
Support for configuring screen backlight Accelerant interface: Introduce new hooks B_SET_BRIGHTNESS and B_GET_BRIGHTNESS. Brightness is a float in the 0..1 range. App_server: Forward brightness things between BScreen and the accelerant. intel_extreme: Implement the hooks. Note that this only works for laptop panels, but the driver will pretend to support it in other cases as well. Screen preferences: If the accelerant supports the B_GET_BRIGHTNESS hook, allow to set brightness with a slider. Otherwise, the slidere is hidden and these changes aren't visible.
|
#
9b6b158b |
|
10-Mar-2016 |
dsizzle <dcieslak@yahoo.com> |
Implementation of BFont::Blocks BFont::Blocks is now implemented in ServerFont, via a call through the app_server. It uses fontconfig to iterate through a charset of a font and stores the defined blocks in a bitmap. A new API was added, BFont::IncludesBlock, that will allow for arbitrary testing of a given Unicode block. Since nothing is cached, searching through an entire charset for a series of Unicode blocks can be quite slow. In a given block there may be only 1 or 2 characters actually defined so every character within a block needs to be checked until one is found, which in a degenerate case will mean the entire block is checked. Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
|
#
7f9368ca |
|
09-Dec-2015 |
looncraz <looncraz@looncraz.net> |
Set*UIColor, etc. The inseparable changes necessary to support live color updating across the system in a sane, safe, and performant manner. BView gains: HasSystemColors() HasDefaultColors() AdoptSystemColors() AdoptParentColors() AdoptViewColor(BView*) SetViewUIColor(color_which, float tint) SetHighUIColor(... SetLowUIColor(... ViewUIColor(float* tint) HighUIColor(... LowUIColor(... DelayedInvalidate() BWindow gains a simple helper method: IsOffscreenWindow() BMessage gains: AddColor() FindColor() GetColor() HasColor() * allegedly this API is deprecated, but I implemented it anyway ReplaceColor() SetColor() Previous private ColorTools methods are made public and moved into GraphicsDefs: mix_color, blend_color, disable_color These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup of BeOS example code under the OpenTracker license. In addition, four new colors are created: B_LINK_TEXT_COLOR B_LINK_HOVER_COLOR B_LINK_ACTIVE_COLOR B_LINK_VISITED_COLOR These changes are documented in their proper user documentation files. In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit. On the app_server side, the following has changed: Add DelayedMessage - a system by which messages can be sent at a scheduled time, and can also be merged according to set rules. A single thread is used to service the message queue and multiple recipients can be set for each message. Desktop gains the ability to add message ports to a DelayedMessage so that said messages can target either all applications or all windows, as needed. Desktop maintains a BMessage which is used to queue up all pending color changes and the delayed messaging system is used to enact these changes after a short period of time has passed. This prevents abuse and allows the system to merge repeated set_ui_color events into one event for client applications, improving performance drastically. In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message to each BWindow. This is done to improve performance over having the app_server independently informing each window. Decorator changes are live now, which required some reworking. Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
|
#
eb431663 |
|
11-Mar-2014 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
app_server & interface kit: support fill rules. * BView gets SetFillRule/FillRule methods. The fill rule is part of the view state. * The B_NONZERO rule is the default. This is what we implemented before. * The B_EVEN_ODD rule is the other common possibility for this, and we need to support it to help WebKit to render properly.
|
#
59347b7f |
|
13-Aug-2012 |
Ryan Leavengood <leavengood@gmail.com> |
Reverse the meaning of BWindow fShowLevel to match BView. This also matches the client_window_info.show_hide_level field used in Deskbar and other applications. While doing this, keep fShowLevel fully in sync between BWindow and app_server, use one message type for both hiding and showing, and make the decision to show and hide the window in the app_server. Lastly make minimize behave as described in the Be Book: hidden windows cannot be minimized, and minimized windows which get hidden become unminimized.
|
#
b46615c5 |
|
19-May-2011 |
Stephan Aßmus <superstippi@gmx.de> |
Applied patch by Joseph "looncraz" Groover from ticket #7445. This changes how Decorators are managed and applied. The app_server no longer scans and maintains the available ones himself, but is simply asked to load a Decorator add-on from a provided path. The Decorator scanning is moved into DecorInfo and DecorInfoUtil, private classes in the InterfaceKit. The bin command 'setdecor' uses those. I cleaned up all the coding style violations that I could find, removed chunks of code which didn't make sense (if you never put a NULL pointer into a list, you don't need to check for this and so on) and also cleaned up other passages for improved clarity and simplicity. I also tested the functionality and it works fine. Would even be Ok to include in Alpha 3, IMHO. Thanks for the patch! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41581 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
33394b85 |
|
16-May-2010 |
Stephan Aßmus <superstippi@gmx.de> |
Patch by Wim van der Meer: Added get_mouse_bitmap() global method to InterfaceDefs.h and corresponding implementation in the app_server. Thanks a bunch! Closes ticket #5978. A note to those using "update-all" with hybrid builds - the alternative GCC system libs will not be updated this way, and this and Wim's last patch change the libbe <-> app_server interface. You need to manually update the respective libbe.so, or do a clean build, otherwise apps for the other GCC will not start anymore. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36830 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1c73ffa1 |
|
14-May-2010 |
Stephan Aßmus <superstippi@gmx.de> |
Patch by Wim van der Meer: Implemented global Interface Kit function to retrieve the current mouse position and pressed buttons. I've changed the return code to status_t and added anal error checking, most of the rest of the file is not doing it, though... :-) Thanks, Wim! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36811 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
926e63c8 |
|
22-Oct-2009 |
Brecht Machiels <brecht@mos6581.org> |
* added click to focus mouse mode; right-click for bring-to-front and send-to-back (might cause some regressions in FFM) * made accept first click user configurable * updated the Mouse preflet to use the layout kit * removed the warp and instant warp modes from the Mouse preflet * changed internal representation of mouse modes (warp modes moved) * coding style fixes git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33732 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
69f9a367 |
|
29-Jul-2009 |
Axel Dörfler <axeld@pinc-software.de> |
* The app_server no longer uses workspace counts internally, but only columns, and rows. * set_workspace_count() now uses the logic formerly found in WorkspacesView::_GetGrid() to determine the layout. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31958 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
19e179ca |
|
19-Jun-2009 |
Stephan Aßmus <superstippi@gmx.de> |
* Moved the implementation of SetViewCursor from the thread of the window of the view into the application thread. This solves the race condition with asynchronous SetViewCursor and deleting the cursor immediately afterwards for real. * The ServerApp now requires a reference to the current cursor, just in case... * Added TODOs for caching the BView token, it's currently resolved for every single BView call that talks to the server... not good! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31133 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
991547ef |
|
14-Oct-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Patch by Artur Wyszynski: * Implemented BGradient, BGradientLinear, BGradientRadial, BGradientDiamond, BGradientConic and BGradientRadialFocus new Interface Kit classes. * Implemented all the (AGG-based) backend necessary in the app_server to render gradients (Painter, DrawingEngine) * app_server/View can convert a BGradient layout to screen coordinates. * Added BGradient methods of the Fill* methods in BView. * Implemented a test app and added it to the image as a demo. * Adopted Icon-O-Matic and libs/icon in order to avoid clashing with the new BGradient class. Re-use some parts where possible. Awesome work, Artur! Thanks a lot. Now a more modern looking GUI has just become much easier to implement! :-) TODO: * Remove the need to have gradient type twice in the app_server protocol. * Refactor some parts of the patch to remove duplicated code (Painter, DrawingEngine). * Adopt the BPicture protocol to know about BGradients. * Review some parts of the BArchivable implementation. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28109 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
59e13a3f |
|
03-Aug-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Patch by Andrej Spielmann (GSoC): * Simplified the subpixel related methods for the AGG "pixel format" template interface, the ones for the solid cover simply pass through the existing methods, so only one subpixel blending function is left which does the actual work (this removes a lot of the previously added code) * Implemented a new rasterizer based on the original AGG rasterizer which implements subpixel anti-aliasing for any generic AGG vector pipelines. It is now optionally used in Painter and AGGTextRenderer (for vector fonts, ie rotated, sheared or big enough fonts) depending on the global subpixel setting. * Put all subpixel variables into the new GlobalSubpixelSettings.h|cpp * Simplified DesktopSettings related classes a bit and renamed previous FontSubpixelAntialiasing to just SubpixelAntialiasing. * The private libbe functions for subpixel related settings moved from Font.cpp to InterfaceDefs.cpp where other such functions live. They are not related to fonts only anymore. * Removed the subpixel related settings again from the Fonts preflet and added them to the Appearance preflet instead. All of the above implements subpixel anti-aliasing on a global scale, which to my knowledge no other OS is doing at the moment. Any vector rendering can optionally use subpixel anti-aliasing in Haiku now. The bitmap cached fonts are still affected by the Freetype complile time #define to enable the patented subpixel rasterization (three times wide glyphs). Vector fonts and shapes are not affected though at the moment. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26755 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b09e2f6f |
|
10-Jul-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Patch by Andrej Spielmann (GSOC): * Extend the app_server protocol by configuration options to turn subpixel font rendering on/off and also make the glyph hinting optional (aligning of glyph shapes to the pixel grid). * Implement the setting in the app_server and also handle the persistency. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26362 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c7a77521 |
|
08-Mar-2008 |
Axel Dörfler <axeld@pinc-software.de> |
Renamed all *LAYER* constants to *VIEW*. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24306 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
437b1927 |
|
08-Mar-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Removed severly outdated DebugInfoManager. * More "layer" cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24305 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f6e4cbb9 |
|
15-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class definitions). * Minor cleanup here and there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c9d2046f |
|
04-Aug-2007 |
Stephan Aßmus <superstippi@gmx.de> |
* after my last changes to font rendering, it was about 15% slower than before (although there should be much less lock contention) * with this change, there is quite a bit of cleanup, text drawing is now about 20% faster than before the original changes to font caching, mostly due to turning off the kerning feature, which at the moment gives absolutely no benefit. The correct way of doing it might be to use kerning depending on the provided glyph spacing mode * removed fPenLocation from Painter, the usage should be more correct now, since it is now consistently applied before the coordinate transformation from view to screen (also for DrawShape() now, before any view scaling and origin offset) * Painter no longer has it's own instance of a ServerFont, instead it uses its AGGTextRenderer instance, which was per Painter again after the last change, and not global anymore, made _UpdateFont() useless * When using GlyphLayoutEngine, it supports a second pass with the same FontCacheEntry through the introduction of a FontCacheReference. This speeds up DrawString a little, since it needs to calculate the bounding box for the string, and then draw the string in a second pass. This is now done with only one FontCacheEntry lookup * I also tried to optimize the on-the-fly conversion of UTF8->CharCode away, since it was done four times per DrawString, but surprisingly, it proofed to be a slight slowdown. * introduced a shortcut in DrawingEngine::DrawString() which avoids calculating the bounding box, we are now a tiny bit faster to figure out that we don't need to draw any string than Dano In the test environment (drawing to offscreen bitmap and blitting to screen eventually), text rendering is now about 3.7 times _faster_ than Dano text rendering (directly to screen), for untransformed text. Unfortunately I cannot test on the same machine in accelerant using version of the test environment. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21822 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2222864e |
|
02-Aug-2007 |
Stephan Aßmus <superstippi@gmx.de> |
* complete overhaul of the font/glyph caching * the previous AGG implementation is superfluous * the new implementation is based on that one, but in a way that allows read/write locking to the list of cache entries (fonts) as well as read/write locking to the cached glyphs per individual font cache entry * new GlyphLayoutEngine.h, which is to be the central place for layouting glyphs along the baseline. It handles the locking for getting the font cache entries. It works by giving it a template class GlyphConsumer which does the actual work. * changed AGGTextRenderer to use the new font cache * changed ServerFont::StringWidth(), and the bounding box stuff to use it * changed DrawingEngine, it doesn't need the global font lock anymore * our BFont thought that GetBoundingBoxesAsGlyphs and GetBoundingBoxesAsString is the same, which of course it isn't, hence the two separate functions... AsGlyphs just gets the bounding box of each glyph in a string, not treating the string as an actual word AsString adds the offset of the glyph in the word to the bounding box * changed ServerProtocol.h accordingly for the different bounding box meaning git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21797 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
38287e02 |
|
22-Jul-2007 |
Stephan Aßmus <superstippi@gmx.de> |
* completed my changes to DrawState handling, the current DrawingState of the active ViewLayer is now always mirrored in the Painter instance of a ServerWindow, so that it doesn't need to be synced on every drawing command, this was previously incomplete for font handling * removed the DrawState parameter from all the DrawingEngine functions * adjusted ServerWindow and ServerPicture accordingly * made sure that string related functions used by non-drawing related parts (ServerApp, Decorator) don't interfere with the current drawing state * moved AS_SYNC handling from _DispatchViewMessage to _DispatchMessage, it is actually a window message and doesn't require fCurrentLayer to be valid * fixed bug #1300, fCurrentLayer was not updated when a ViewLayer was deleted by client request which happened to be fCurrentLayer (I am now handling it so that the parent becomes the current layer, could be wrong) * AGGTextRenderer is no longer using it's own scanline, which should save a few bytes RAM, the Painter already had such an object * StringWidth() in AGGTextRenderer is now taking the escapement_delta into account * Painter::StrokeLine() doesn't need to check the clipping as much, since that is already done in DrawingEngine * if a ServerWindow message is not handled because fCurrentLayer is NULL, a reply is sent in case the messages needs it (client window could freeze otherwise, waiting for the reply for ever) * removed unused AS_SET_FONT and AS_SET_FONT_SIZE * added automatic RGBColor -> rgb_color conversion to RGBColor.h * minor cleanup for 80 char/line limit git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21685 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
67f3be42 |
|
17-Jul-2007 |
Stephan Aßmus <superstippi@gmx.de> |
* added ProfileMessageSupport.h/cpp to translate server message codes to a string * fixed profiling of message processsing in ServerWindow (didn't take batch processing into account) * accelerated ViewLayer::RebuildClipping() by a factor of two by avoiding BRegion::Exclude(clipping_rect) for each child, and instead building one region with all children, and excluding that. RebuildClipping() is quite a common operation and is quite slow for views with many children git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21646 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
eb431663264ef319e72b492801fb867b5d71910b |
|
11-Mar-2014 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
app_server & interface kit: support fill rules. * BView gets SetFillRule/FillRule methods. The fill rule is part of the view state. * The B_NONZERO rule is the default. This is what we implemented before. * The B_EVEN_ODD rule is the other common possibility for this, and we need to support it to help WebKit to render properly.
|
#
59347b7f1bad11b684ce8c6ed594781f5d2eb4e2 |
|
13-Aug-2012 |
Ryan Leavengood <leavengood@gmail.com> |
Reverse the meaning of BWindow fShowLevel to match BView. This also matches the client_window_info.show_hide_level field used in Deskbar and other applications. While doing this, keep fShowLevel fully in sync between BWindow and app_server, use one message type for both hiding and showing, and make the decision to show and hide the window in the app_server. Lastly make minimize behave as described in the Be Book: hidden windows cannot be minimized, and minimized windows which get hidden become unminimized.
|
#
b46615c55ad2c8fe6de54412055a0713da3d610a |
|
19-May-2011 |
Stephan Aßmus <superstippi@gmx.de> |
Applied patch by Joseph "looncraz" Groover from ticket #7445. This changes how Decorators are managed and applied. The app_server no longer scans and maintains the available ones himself, but is simply asked to load a Decorator add-on from a provided path. The Decorator scanning is moved into DecorInfo and DecorInfoUtil, private classes in the InterfaceKit. The bin command 'setdecor' uses those. I cleaned up all the coding style violations that I could find, removed chunks of code which didn't make sense (if you never put a NULL pointer into a list, you don't need to check for this and so on) and also cleaned up other passages for improved clarity and simplicity. I also tested the functionality and it works fine. Would even be Ok to include in Alpha 3, IMHO. Thanks for the patch! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41581 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
33394b856dfc5366693cc81b47885d0bd4facd99 |
|
16-May-2010 |
Stephan Aßmus <superstippi@gmx.de> |
Patch by Wim van der Meer: Added get_mouse_bitmap() global method to InterfaceDefs.h and corresponding implementation in the app_server. Thanks a bunch! Closes ticket #5978. A note to those using "update-all" with hybrid builds - the alternative GCC system libs will not be updated this way, and this and Wim's last patch change the libbe <-> app_server interface. You need to manually update the respective libbe.so, or do a clean build, otherwise apps for the other GCC will not start anymore. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36830 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1c73ffa1021c1426dbce9675256f4f8cdc22bb56 |
|
14-May-2010 |
Stephan Aßmus <superstippi@gmx.de> |
Patch by Wim van der Meer: Implemented global Interface Kit function to retrieve the current mouse position and pressed buttons. I've changed the return code to status_t and added anal error checking, most of the rest of the file is not doing it, though... :-) Thanks, Wim! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36811 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
926e63c8851f8e1d085981e69ef03f8e9cda1e65 |
|
22-Oct-2009 |
Brecht Machiels <brecht@mos6581.org> |
* added click to focus mouse mode; right-click for bring-to-front and send-to-back (might cause some regressions in FFM) * made accept first click user configurable * updated the Mouse preflet to use the layout kit * removed the warp and instant warp modes from the Mouse preflet * changed internal representation of mouse modes (warp modes moved) * coding style fixes git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33732 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
69f9a367bc3ade44eaf73a5b1c51c079acf702cd |
|
29-Jul-2009 |
Axel Dörfler <axeld@pinc-software.de> |
* The app_server no longer uses workspace counts internally, but only columns, and rows. * set_workspace_count() now uses the logic formerly found in WorkspacesView::_GetGrid() to determine the layout. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31958 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
19e179ca4ff838084b9abb0dd19932ac5fcd0051 |
|
19-Jun-2009 |
Stephan Aßmus <superstippi@gmx.de> |
* Moved the implementation of SetViewCursor from the thread of the window of the view into the application thread. This solves the race condition with asynchronous SetViewCursor and deleting the cursor immediately afterwards for real. * The ServerApp now requires a reference to the current cursor, just in case... * Added TODOs for caching the BView token, it's currently resolved for every single BView call that talks to the server... not good! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31133 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
991547ef6c1fca650f0fba855206296ef54bc441 |
|
14-Oct-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Patch by Artur Wyszynski: * Implemented BGradient, BGradientLinear, BGradientRadial, BGradientDiamond, BGradientConic and BGradientRadialFocus new Interface Kit classes. * Implemented all the (AGG-based) backend necessary in the app_server to render gradients (Painter, DrawingEngine) * app_server/View can convert a BGradient layout to screen coordinates. * Added BGradient methods of the Fill* methods in BView. * Implemented a test app and added it to the image as a demo. * Adopted Icon-O-Matic and libs/icon in order to avoid clashing with the new BGradient class. Re-use some parts where possible. Awesome work, Artur! Thanks a lot. Now a more modern looking GUI has just become much easier to implement! :-) TODO: * Remove the need to have gradient type twice in the app_server protocol. * Refactor some parts of the patch to remove duplicated code (Painter, DrawingEngine). * Adopt the BPicture protocol to know about BGradients. * Review some parts of the BArchivable implementation. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28109 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
59e13a3f06eedbc797f797da71c6810634b22cd4 |
|
03-Aug-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Patch by Andrej Spielmann (GSoC): * Simplified the subpixel related methods for the AGG "pixel format" template interface, the ones for the solid cover simply pass through the existing methods, so only one subpixel blending function is left which does the actual work (this removes a lot of the previously added code) * Implemented a new rasterizer based on the original AGG rasterizer which implements subpixel anti-aliasing for any generic AGG vector pipelines. It is now optionally used in Painter and AGGTextRenderer (for vector fonts, ie rotated, sheared or big enough fonts) depending on the global subpixel setting. * Put all subpixel variables into the new GlobalSubpixelSettings.h|cpp * Simplified DesktopSettings related classes a bit and renamed previous FontSubpixelAntialiasing to just SubpixelAntialiasing. * The private libbe functions for subpixel related settings moved from Font.cpp to InterfaceDefs.cpp where other such functions live. They are not related to fonts only anymore. * Removed the subpixel related settings again from the Fonts preflet and added them to the Appearance preflet instead. All of the above implements subpixel anti-aliasing on a global scale, which to my knowledge no other OS is doing at the moment. Any vector rendering can optionally use subpixel anti-aliasing in Haiku now. The bitmap cached fonts are still affected by the Freetype complile time #define to enable the patented subpixel rasterization (three times wide glyphs). Vector fonts and shapes are not affected though at the moment. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26755 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b09e2f6f4bcda91da778d565b7a814841bad05a6 |
|
10-Jul-2008 |
Stephan Aßmus <superstippi@gmx.de> |
Patch by Andrej Spielmann (GSOC): * Extend the app_server protocol by configuration options to turn subpixel font rendering on/off and also make the glyph hinting optional (aligning of glyph shapes to the pixel grid). * Implement the setting in the app_server and also handle the persistency. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26362 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c7a77521ffc3a115780a9abd6c46e07fe17ada39 |
|
08-Mar-2008 |
Axel Dörfler <axeld@pinc-software.de> |
Renamed all *LAYER* constants to *VIEW*. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24306 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
437b19277feacd48292ca9ec814a38da17e4eb89 |
|
08-Mar-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Removed severly outdated DebugInfoManager. * More "layer" cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24305 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f6e4cbb95290a74b33d012600438b84742b0e572 |
|
15-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class definitions). * Minor cleanup here and there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c9d2046fe5b12fee15b6c24960d29fd581a81cef |
|
04-Aug-2007 |
Stephan Aßmus <superstippi@gmx.de> |
* after my last changes to font rendering, it was about 15% slower than before (although there should be much less lock contention) * with this change, there is quite a bit of cleanup, text drawing is now about 20% faster than before the original changes to font caching, mostly due to turning off the kerning feature, which at the moment gives absolutely no benefit. The correct way of doing it might be to use kerning depending on the provided glyph spacing mode * removed fPenLocation from Painter, the usage should be more correct now, since it is now consistently applied before the coordinate transformation from view to screen (also for DrawShape() now, before any view scaling and origin offset) * Painter no longer has it's own instance of a ServerFont, instead it uses its AGGTextRenderer instance, which was per Painter again after the last change, and not global anymore, made _UpdateFont() useless * When using GlyphLayoutEngine, it supports a second pass with the same FontCacheEntry through the introduction of a FontCacheReference. This speeds up DrawString a little, since it needs to calculate the bounding box for the string, and then draw the string in a second pass. This is now done with only one FontCacheEntry lookup * I also tried to optimize the on-the-fly conversion of UTF8->CharCode away, since it was done four times per DrawString, but surprisingly, it proofed to be a slight slowdown. * introduced a shortcut in DrawingEngine::DrawString() which avoids calculating the bounding box, we are now a tiny bit faster to figure out that we don't need to draw any string than Dano In the test environment (drawing to offscreen bitmap and blitting to screen eventually), text rendering is now about 3.7 times _faster_ than Dano text rendering (directly to screen), for untransformed text. Unfortunately I cannot test on the same machine in accelerant using version of the test environment. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21822 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2222864eed6bc28cff3d837c98d1509dcbcf38bc |
|
02-Aug-2007 |
Stephan Aßmus <superstippi@gmx.de> |
* complete overhaul of the font/glyph caching * the previous AGG implementation is superfluous * the new implementation is based on that one, but in a way that allows read/write locking to the list of cache entries (fonts) as well as read/write locking to the cached glyphs per individual font cache entry * new GlyphLayoutEngine.h, which is to be the central place for layouting glyphs along the baseline. It handles the locking for getting the font cache entries. It works by giving it a template class GlyphConsumer which does the actual work. * changed AGGTextRenderer to use the new font cache * changed ServerFont::StringWidth(), and the bounding box stuff to use it * changed DrawingEngine, it doesn't need the global font lock anymore * our BFont thought that GetBoundingBoxesAsGlyphs and GetBoundingBoxesAsString is the same, which of course it isn't, hence the two separate functions... AsGlyphs just gets the bounding box of each glyph in a string, not treating the string as an actual word AsString adds the offset of the glyph in the word to the bounding box * changed ServerProtocol.h accordingly for the different bounding box meaning git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21797 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
38287e02afe4c0b08ae1c2c3279bb8d3a2e07fc2 |
|
22-Jul-2007 |
Stephan Aßmus <superstippi@gmx.de> |
* completed my changes to DrawState handling, the current DrawingState of the active ViewLayer is now always mirrored in the Painter instance of a ServerWindow, so that it doesn't need to be synced on every drawing command, this was previously incomplete for font handling * removed the DrawState parameter from all the DrawingEngine functions * adjusted ServerWindow and ServerPicture accordingly * made sure that string related functions used by non-drawing related parts (ServerApp, Decorator) don't interfere with the current drawing state * moved AS_SYNC handling from _DispatchViewMessage to _DispatchMessage, it is actually a window message and doesn't require fCurrentLayer to be valid * fixed bug #1300, fCurrentLayer was not updated when a ViewLayer was deleted by client request which happened to be fCurrentLayer (I am now handling it so that the parent becomes the current layer, could be wrong) * AGGTextRenderer is no longer using it's own scanline, which should save a few bytes RAM, the Painter already had such an object * StringWidth() in AGGTextRenderer is now taking the escapement_delta into account * Painter::StrokeLine() doesn't need to check the clipping as much, since that is already done in DrawingEngine * if a ServerWindow message is not handled because fCurrentLayer is NULL, a reply is sent in case the messages needs it (client window could freeze otherwise, waiting for the reply for ever) * removed unused AS_SET_FONT and AS_SET_FONT_SIZE * added automatic RGBColor -> rgb_color conversion to RGBColor.h * minor cleanup for 80 char/line limit git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21685 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
67f3be42b00f063f84e4e9a743dcf431f99c311d |
|
17-Jul-2007 |
Stephan Aßmus <superstippi@gmx.de> |
* added ProfileMessageSupport.h/cpp to translate server message codes to a string * fixed profiling of message processsing in ServerWindow (didn't take batch processing into account) * accelerated ViewLayer::RebuildClipping() by a factor of two by avoiding BRegion::Exclude(clipping_rect) for each child, and instead building one region with all children, and excluding that. RebuildClipping() is quite a common operation and is quite slow for views with many children git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21646 a95241bf-73f2-0310-859d-f6bbb57e9c96
|