Commit Graph

1979 Commits

Author SHA1 Message Date
Michael Lotz ee18c3ccff Added an extended ImportBits() to ServerBitmap to allow the use of offsets and made ReadBitmap() use it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-06 00:18:26 +00:00
Michael Lotz bdc6f9e7ef * Fixed a swapping bug for 16 bit colorspaces
* Added some comments
* Added some checking to avoid noop shifts
* Added buffer length checks
* Implemented (as Stephan suggested) a version of ConvertBits() that takes offsets.
This new version allows to move a region of the source into a region (possibly not at the same point) on the dest while converting colorspaces on the fly.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 23:53:33 +00:00
Axel Dörfler 0d4c16e0c0 * Reduced the stack usage of most of the I/O paths - there were several places
that put one or more full paths on the stack before, which could cause some
  problems under certain conditions.
* Cleaned up KPath, ie. use size_t instead of int32 where appropriate, added
  license.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 18:11:59 +00:00
Axel Dörfler f97a4547ac Enabled debugging kernel stacks by default for now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 18:05:33 +00:00
Michael Lotz acfad7920c Added an ImportBits() function to ServerBitmap and used it in ReadBitmap(). Should work for all colorspaces now.
Magnify does now work correctly, fixed bug 197.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 12:59:39 +00:00
Michael Lotz b09e53fae0 Wrote a new color conversion engine. It's 2-5 times faster than the old one (depending on colorspaces) and about half in size.
I've put it into ColorConversion.cpp and moved PaletteConverter there too, cleaning up Bitmap.cpp.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-05 05:01:15 +00:00
Stefano Ceccherini 2c11ec31c8 BMenuItem also draws ctrl bitmap if needed, BTextView::AutoResize implemented more correctly
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-03 19:31:09 +00:00
Stefano Ceccherini da2e259d76 added a constant
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-03 19:10:33 +00:00
Axel Dörfler bb674499f8 * Finally implemented B_WATCH_MOUNT, ie. Tracker now shows newly mounted volumes
(mounting still only works from the Terminal).
* Shuffled functions in node_monitor.cpp around to clearly differentiate between
  private, private kernel, and public kernel functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-03 11:48:49 +00:00
Michael Lotz 3e2ee69551 Started implementing the server side of BScreen()->ReadBitmap().
Colorspace conversion is not done yet so that it only works correct in 32bit modes.
Also drawCursor is not respected yet. Partially fixes bug 197.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-02 23:50:06 +00:00
Axel Dörfler d5062208bb * Added a new list_insert_item_before() function that inserts a new item
before another one in the list.
* The video modes in the boot loader are now sorted (by resolution, larger
  resolution comes first). Doubled entries are automatically removed; this
  fixes bug #192.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-02 22:48:47 +00:00
Axel Dörfler f94b06f992 Implemented SSE2/3 support (tested with VLC).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-02 17:12:56 +00:00
Axel Dörfler f19839c230 Some groundwork for overlay support. If someone wants to finish this, feel
free to continue (it would be nice to be notified before, though, in case
I get to it again in the next weeks).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-01 21:20:57 +00:00
Axel Dörfler bfe698736d * Implemented private do_window_action() function, used by the Deskbar to bring
windows to front (or minimize them).
* Desktop::ActivateWindow() no longer crashes in case the window to be activated
  is not on the current workspace - instead, it doesn't do anything at this
  point. IOW it doesn't handle workspace activation at all, yet.
* Renamed ServerWindow::GetWindowLayer() to ServerWindow::Window().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-28 18:31:16 +00:00
Axel Dörfler 2ed942c199 * Added LinkReceiver methods that return the length of the string.
* AS_GET_STRING_WIDTHS now uses this method to send the strings to the app_server;
  ie. it no longer sends the whole strings, and it saves sending the string length
  separately.
* BFont::StringWidth() will now always return 0.0f in case of an error (instead of
  some random value)
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-27 13:09:37 +00:00
Stephan Aßmus 588259b66d various changes to handling custom cursors:
* all cursors owned by a team are visually different,
  or (iaw) an already existing cursor is reused when
  it is set by the client again
* changed various occurances of cursor data from "int8*"
  to "uint8*"
* ServerCursors also remember the R5 data from which
  they were created
* the reference counting and destruction of
  ServerCursors changed: The cursor knows it is attached
  to a CursorManager and one can simply use
  ServerCursor::Acquire() and Release() and the reference
  counting and everything is being taken care of
* destroying a ViewLayer will now correctly release a set
  ServerCursor
* fixed a race condition when setting a cursor through
  BView::SetViewCursor(): If the client code looks like this:

  BCursor cursor(cursorData);
  someView->SetViewCursor(&cursor, false);

  there is a relatively high chance the BCursor destructor
  told the ServerApp thread to destroy the cursor before
  the ServerWindow thread got to "acquire" the cursor for
  use by the view layer. The very same problem is likely the
  reason that SetViewCursor works to unreliably on R5, even
  when the "sync" flag is set to "true" (although it should
  theoretically work in that case).

all these fixes make WonderBrush work fine again with the
new support of custom cursors.... coded by axeld and myself
(the joys of pair programming :-)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-26 18:15:31 +00:00
Michael Lotz 20a4e7265c * Changed the AGGTextRenderer to use the new UTF8 handling
* Added more char codes to is_white_space(), should be all I think

Sorry if I stepped on your toes Stephan, but I wanted these changes flushed before I leave for holidays :-).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-23 09:04:26 +00:00
Michael Lotz 6990418519 * Fixed some more bugs in the message passing by area
* Reordered some functions
* Area messages can now be unflattened instead of using the private _Reference and a special port code

Passing by area is now mostly working but it's not yet enabled. I will have to conduct performance tests first to see if and starting at what messagesize the overhead is reasonable.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-23 09:02:03 +00:00
Michael Lotz 5b62df9d36 * Fixed some bugs noticed by rereading the whole implementation
* Added checksum generation and checking

The data itself is now checksummed too (unlike R5 where only the header gets a checksum). This might be a performance problem for larger messages. Opinions?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-20 22:05:39 +00:00
Jérôme Duval 5a2ad00cab fix a TODO in _user_mount : added an argsLength parameter
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-20 18:04:27 +00:00
Michael Lotz 721a0fe3e4 Started implementing message passing by area. This will be needed for drag & drop messages and will probably be used for large messages instead of sending them through a port. Not yet finished and not enabled. Cleaned up a part of BLooper - this class should probably be cleaned up completely.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16459 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-18 12:29:05 +00:00
Rudolf Cornelissen f7f30d794e made chip_arch and chip_type accessible for 3D accelerant
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-16 20:43:38 +00:00
Axel Dörfler 98d9f1b483 * Only allowed application hints of B_MIME_TYPE_LENGTH instead of B_PATH_NAME_LENGTH.
* Introduced a _SetStringValue() to avoid code duplication.
* The string types now check the original value, and don't write anything if the
  contents stay unchanged (with the current exception of the sniffer rules).
* The monitor notfication methods no longer "clobber" the status result.
* Major cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-16 19:27:39 +00:00
Axel Dörfler eb797182df Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-16 17:37:36 +00:00
Axel Dörfler 62b5f42b35 * Fixed view deletion: _CreateSelf() and RemoveSelf() are now symmetrical, removing
all those error output from the app_server.
* AS_LAYER_DELETE now gets a token, no longer frightening choice of parent.
* Removed locking in RemoveChild(); it has to be called locked now.
* Removed AS_LAYER_DELETE_ROOT as it's no longer needed.
* Removed support from BView for being PR3 compatible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-16 14:43:33 +00:00
Rudolf Cornelissen bfaacc661f added acc engine's retrace sync capability related register defines
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-14 21:17:23 +00:00
Rudolf Cornelissen 1157cf1e2f added define for NV12_BLIT function (with retrace sync capability)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-14 19:32:14 +00:00
Rudolf Cornelissen 24fa0e7be9 added new nv.setting 'force_sync'.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-14 16:08:21 +00:00
Marcus Overhagen fbe9b0b6eb This fixes bug #149.
Input server now saves keyboard typematic settings whenever they are modified,
instead of wating until it is shutdown (which never happens, either the
system will crash, or the input_server will stay active after a normal shut down)
Same problems might apply to mouse and keymap settings.
Input server shutdown handling should be reviewed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-13 17:35:05 +00:00
Stefano Ceccherini 38690d41b0 Renamed TPicture class to PicturePlayer
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-10 21:38:53 +00:00
Axel Dörfler f877af82fe * Implemented private functions do_minimize_team(), and do_bring_to_front_team()
used by the Deskbar (for "Hide All" and "Show All"). The latter doesn't work
  correctly yet, though, it just maximizes all windows of that application.
* Added a TODO to ServerWindow AS_MINIMIZE_WINDOW on how to make it work correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-09 18:53:36 +00:00
Axel Dörfler 995ab7b3c6 The server now differentiates between hidden and minimized - that concept somehow
got lost, before.
It might not work 100% correctly yet, but it works good enough to hide the Tracker
status window from the Deskbar, and thus, fixing bug #133.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-09 18:28:29 +00:00
Rudolf Cornelissen c72f6a6d0b rewrote kerneldriver and accelerants retrace INT handling. Bumped version to 0.72.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-07 15:00:40 +00:00
Ingo Weinhold f4b0f67cf6 Added [arch_]int_post_device_manager() which is invoked after
the device manager is initialized. For x86 it does nothing, but
for PPC it searches for a supported interrupt controller and
remembers it for later use.
arch_int_{enable,disable}_io_interrupt() are implemented as
well as handling of external exceptions (aka as I/O interrupts).
We'll see later how well that works.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-07 02:50:32 +00:00
Michael Lotz 9e7948f45e * Fixed locking of the FT_Face by moving it into Get/PutTransformedFace()
* Removed the FaceGetter as it was only needed for locking
* Cleaned up TruncateString()
* Fixed a typo in moreUTF8.h

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 17:42:18 +00:00
Axel Dörfler d5ffccabb7 * Removed unused MakeBlendColor().
* At least 15 bit mode is broken, and should probably be removed.
* Cleanup - do we really need this class?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16247 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-06 11:47:13 +00:00
Michael Lotz db5734a452 More work on the BFont special functions.
* Reworked functions like GetEscapements(), GetBoundingBoxesAsString() and GetGlyphShapes() completely
* Made the ServerFont functions uniform in their prototypes and cleaned out unnecessary arguments
* Added new UTF8 handling functions to moreUTF8.h that are now used by ServerFont
* Put the common transformations of the FT_Face into an own GetTransformedFace() to lessen code duplication

In other words, ServerFont is now cleaned and handles UTF8 pretty efficiently. Some ToDo's are still left though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 23:36:59 +00:00
Axel Dörfler 195e980ef1 * Cursors are now reference counted, so it shouldn't be possible anymore
to delete them accidently :)
* You should no longer call HWInterface::SetCursor(), but the new Desktop::SetCursor()
  if you need to change the cursor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 19:43:44 +00:00
Axel Dörfler aa1f543799 Some work on cursors:
* Fixed a myriad of bugs all over the place, ranging from locking errors to
  deleting objects that don't belong to the one deleting them (hello HWInterface!)
* Almost all ServerWindow cursor stuff was broken; I've replaced all commands
  to set a cursor with a single one AS_SET_CURSOR.
* Renamed some cursor commands.
* Changed the (broken) way ServerApp::fAppCursor was maintained - the application
  cursor is now NULL as long as possible.
* Removed superfluous ServerCursor app signature stuff.
* The BApplication will no longer duplicate the default/I-beam cursors, it will
  just reuse the default ones which now have fixed tokens.
* As a result, changing the cursor is now working as expected, closing bug #102.
* Rewrote Cursor.h, renamed private members to match our style guide.
* Minor cleanup.

What's still left to be done is reference counting the cursor objects to make them
work right and reliable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 18:14:14 +00:00
Rudolf Cornelissen 20b32cf501 added dangerous-RAM-size defines for hw-bug workaround.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-02 15:53:37 +00:00
Axel Dörfler d14aab0dca Changed the way how CPU activity is monitored: instead of taking the active
time of the idle thread as a measure, we now compute the CPU activity on
each thread switch - the time the CPU worked is the total of user and kernel
time a thread spent during its quantum.
Unlike before, this mechanism works correctly on SMP machines. I hope this
works as expected :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 20:03:55 +00:00
Axel Dörfler df213cedbc * CPUs can now be disabled - that is, they will keep idling.
* Added syscalls _kern_set_cpu_enabled() and _kern_cpu_enabled().
* scheduler.c::sRunQueue::tail was not maintained at all; changed sRunQueue to
  be a simple thread pointer instead of a struct thread_queue.
* Turns out we're monitoring CPU activity incorrectly when we've got more
  than one CPU.
* Renamed the global CPU array from "cpu" to gCPU.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 16:09:05 +00:00
Axel Dörfler 204131dc97 Added a real yield function to the kernel (using the next_priority approach).
The test application lets run a thread at the highest priority that calls
yield all the time - the system stays responsible when it runs, so it seems
to work fine :)
Changed the malloc implementation to use _kern_thread_yield() instead of
snoozing.
We should think about making this call public, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 02:29:02 +00:00
Axel Dörfler d14af9fde6 Introduced a next_priority field to struct thread that will be used when
enqueueing a thread to the run queue.
This mechanism is now used for the thread priority boost on semaphore
release. Also, those threads are no longer made real time threads, they
now get a temporary priority of B_FIRST_REAL_TIME_PRIORITY - 1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 01:58:49 +00:00
Stefano Ceccherini 61ba5a32c1 Added some code to draw "empty" in empty menus. Not working for the
moment, but committing since it's too late to continue working, and at 
least the window is resized correctly...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-29 22:27:46 +00:00
Axel Dörfler 5da68569d0 The APM now successfully shuts down my IBM ThinkPad T40. It's still disabled
for more testing on other machines.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-29 15:51:33 +00:00
Ingo Weinhold 15424f3d37 Finally fixed update_mime_info(). As Be's version it understands two
different "force" levels now and updates the app file info attributes
for shared object files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16123 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 19:41:07 +00:00
Axel Dörfler afd6dfc8b4 Implemented first basic APM driver. Only tested with QEMU so far, that's why
it's currently disabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 18:11:20 +00:00
Ingo Weinhold 906b28a9ac Added some PPC support to the PCI bus manager. We scan the Open Firmware
device tree for PCI controllers and make them known to the bus manager,
if we know how to talk with them. ATM we support only the UniNorth chip,
which can be found in G4 Macs (code ported from FreeBSD).
As far as I can judge it, all attached devices are identified correctly
on all three host bridges of my Mac mini.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-26 15:21:31 +00:00
Ingo Weinhold f602da2b72 * Turned the kernel platform support from a library into an object.
* Moved the Open Firmware function platform_get_next_device() from
  the boot loader into the kernel (renamed to of_get_next_device()).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-26 15:06:59 +00:00