* Replaced all occurences with the standard macros M_PI, and M_PI_2.
* Some coding style cleanup on the touched files, no other changes besides
adding a missing check for a failed memory allocation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31250 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Implemented a CPU feature detection function in AppServer.cpp.
The results are put into the global variable gAppServerSIMDFlags.
* Implemented an SIMD accelerated version of the bilinear bitmap
scaling code that is the backend of BView::DrawBitmap(...,
uint32 options) used by the MediaPlayer to smoothly upscale
movies when no video overlay is available. The speed up is very
noticable and a Core 2 Duo @ 1.8 GHz can play at 1920x1200 now
without breaking a sweat. There is currently one SIMD version
implemented which uses MMX and plain SSE.
Very cool! Thanks a lot!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31165 a95241bf-73f2-0310-859d-f6bbb57e9c96
back to the system default cursor. For that cursor token, the global cursor
manager returns NULL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31138 a95241bf-73f2-0310-859d-f6bbb57e9c96
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
reference counting is maintained correctly in the app_server. While reviewing
this code, I have my doubts that my previous solution for handling pending
SetViewCursor() calls is always working as it is intended.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31131 a95241bf-73f2-0310-859d-f6bbb57e9c96
is considered dirty and only what we are really able to copy (which excludes all
possible dirty regions) is removed from that again. This is simpler and less
error prone than to remove more than we may copy and then add the old dirty
regions back. Fixes a few region copy related redraw issues most visible in case
of scrolling like non-updated parts when scrolling in Tracker or Terminal as in
bug #3803.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30840 a95241bf-73f2-0310-859d-f6bbb57e9c96
* FontManager::GetFamily() removed second call to _FindFamily() with no
action in between -- why would it suddenly work the second time?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30591 a95241bf-73f2-0310-859d-f6bbb57e9c96
since Korli's change in r30440.
* 80 character per line limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30579 a95241bf-73f2-0310-859d-f6bbb57e9c96
* When a BApplication is created, the interface kit globals for this team
are initialized, including be_plain_font, be_bold_font and be_fixed_font.
The plain font specifically is assumed the default font for all BViews.
A BView is not required to every set the font, it will then just be the
plain font, because the app_server already assigned it when the view is
created. Here is where the problem starts. When the system fonts change,
they change on the app_server and are picked up by new applications. Old
applications will run with the old fonts, because the values remain the
same and are stored in the already initialized be_*_font globals. So this
was never a problem. What was a problem is that the app_server would use
the current plain font for applications which were already initialized
before the font was changed, so the values in their be_plain_font would not
match the values in the server side font used when creating new views.
* This patch already prepares for the situation in which client applications
want to update their be_*_font globals. This needs to be a manual act of
the client applications, otherwise we would break existing apps. Maybe we
could automate this for BWindows with the B_AUTO_UPDATE_SIZE_LIMITS flag
and any child views with B_SUPPORTS_LAYOUT.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30282 a95241bf-73f2-0310-859d-f6bbb57e9c96
from DesktopSettings.
It allows you to change the tab color (focused and non focused)
for new windows.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30279 a95241bf-73f2-0310-859d-f6bbb57e9c96
screen height trick for using double buffering with an offscreen half of the
frame buffer. Whenever I run app_server without this patch, it frequently
locks up in weird ways. Additionally, app_server uses less CPU for many graphics
operations, notably the ones that require any blending, ie reading frame buffer.
This should be even more noticable for slow computers. The only draw back is that
slow computers may suffer a bit when just dragging a window, since that is
now performed on the CPU. However, I have high doubts that the benefits don't
outweight the drawbacks, and the feedback I have received indicates that as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30278 a95241bf-73f2-0310-859d-f6bbb57e9c96
headers/private/shared is newer, though with small interface changes.
* Removed the unnecessary Debug.h include in
headers/private/shared/ObjectList.h.
* Adjusted sources using these headers, mostly by adding missing includes.
* Lots of automatic whitespace cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30123 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Fixed a problem when scrolling. Basically, the region that could be copied
should be removed from the pending dirty region. Before a region is copied,
the dirty regions are removed from it. So the region at the target offset
can always be considered clean. This fixes the problem in Tracker when
enlarging windows that are already scrolled to the right or bottom. This then
triggers the Tracker window to scroll the pose view in such a way that the
bottom/right stays fixed, but would trigger this exact situation: The bottom
is already pending dirty, but then the clean contents are copied on top of it.
Fixes ticket #1849 and perhaps also #2975.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30068 a95241bf-73f2-0310-859d-f6bbb57e9c96
from the link. My benchmark measuring is inconclusive, the numbers are sometimes
very different. At first sight, it looks like string drawing can be up to
double as fast with this change, but sometimes, the numbers are about the same.
Hm.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29965 a95241bf-73f2-0310-859d-f6bbb57e9c96
the protocoll less prone to errors, reduces possible points of failure and
most importantly, reduces the number of function calls to the link API.
I only know the numbers for StrokeLine(), which I tested via the Benchmark
test app. With this change, drawing random colored and positioned lines
actually doubled in speed. On the BView side, the calls to
ServerLink::Attach() only halfed, while on the app_server side, the number
of calls to ServerLink::Read() is now 1/4th. It will also be worth
investigating why the link stuff is so slow at all. I also optimized
BView::DrawString() a lot in this change, but I don't have any numbers
yet. Some other commands which used multiple Attach()/Read() calls were
also optimized, at least the most important ones. Begin/EndLineArray() was
also pretty bad on the app_server side.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29937 a95241bf-73f2-0310-859d-f6bbb57e9c96
painting the background. The user may have set that on purpose. For regular
views, it doesn't really make sense to use the user clipping for painting the
background, since there is no way these parts could ever be painted at all.
In Draw() there will be a new view state on the stack, so the client has no
way to unset the clipping. On the other hand, there may be useful cases where
the user applied a clipping, and wants itself not drawing outside of it, but
does want the background painted. (For example BTextView::SetTextRect() may
use this in the future.)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29790 a95241bf-73f2-0310-859d-f6bbb57e9c96
cheaper by preventing to rebuild the clipping on the app_server side.
I think this was commented out, because user clipping was broken until
some point and I forgot to reenable it after I fixed it. At least I cannot
spot any regressions when running with this patch now would I expect to
see regressions, since DrawStates do not mess with the screen clipping,
unless they get a clipping region assigned when the (user) clipping changes
during the state's life time.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29773 a95241bf-73f2-0310-859d-f6bbb57e9c96
trigger a recalculation of the view clipping region (it will now include
children).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29755 a95241bf-73f2-0310-859d-f6bbb57e9c96
trying to switch the workspace. Not sure why it didn't behave previously,
but it seems to work fine now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29514 a95241bf-73f2-0310-859d-f6bbb57e9c96
(the backend of scrolling and BView::CopyBits()). Seems to fix
the dirty entries when opening Tracker windows, and another
problem I've seen when scrolling too fast in Beam.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29495 a95241bf-73f2-0310-859d-f6bbb57e9c96
app_server generated it.
For now used by screen_blanker, in my next commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29492 a95241bf-73f2-0310-859d-f6bbb57e9c96
pixels than can possibly be visible. Clients may pass very large
view rects to layout a zoomed in bitmap. This doesn't only speed things
up, but also avoids a stack overflow in the app_server, as reported in #3166.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29397 a95241bf-73f2-0310-859d-f6bbb57e9c96
this with a reasonable drawing mode. Otherwise the current
graphics state setup may not be what we need.
* Automatic white space cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29309 a95241bf-73f2-0310-859d-f6bbb57e9c96