Commit Graph

2244 Commits

Author SHA1 Message Date
Rudolf Cornelissen
9c9a94038a modified shared_info for mainmem DMA command buffer use.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 09:31:12 +00:00
Axel Dörfler
e5b4782b4e Made some necessary enhancements to class Screen; the app_server also
has to care about refresh rates. Also changed Screen::GetMode() (formerly
Resolution()) to return all interesting values, so that hopefully no one
will call it anymore like RootLayer::SetScreens() did.
Greatly improved the horrible RootLayer::SetScreens().
The app_server is now able to deal with failing HWInterface::SetMode() calls;
in this case, it will fall back to the hardware's current mode. This now
also works correctly in combination with the vesa driver, so that you don't
have to compile the app_server with the same resolution you boot in anymore.
SetMode() now always returns if it succeeded or not.
Renamed RootLayer::fScreenXYResolution to fScreenWidth/Height respectively.
Removed the useless DisplayDriver::DisplayMode() method.
Added B_GET_DISPLAY_MODE to the required accelerant hooks.
Some minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 09:21:51 +00:00
Axel Dörfler
18b6200e54 Enlarged the kernel heap to 16 MB.
This will keep it alive longer until a) the block cache no longer
uses the heap, and b) we get a better heap without a fixed size.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 09:11:30 +00:00
Axel Dörfler
d260b2c469 Made the header C++ safe.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 09:08:54 +00:00
Axel Dörfler
09b83e5cec Removed the obsolete byteorder.h header (it just included ByteOrder.h).
Fixed the remaining references to that header in our repository.
Note, this might break source compatibility - please update your sources :-)
Slightly converted UBS_audio_utils.c to use our style guide while I were at it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 08:12:59 +00:00
Axel Dörfler
d85db27509 Screw source compatibility. Cleaning up the legacy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 23:57:47 +00:00
Stephan Aßmus
74994d1307 added license headers
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 23:47:05 +00:00
Stephan Aßmus
55d6f1b792 Many efficiency improvements to text rendering. Moved stuff from Painter into AGGTextRenderer which didn't belong in Painter. AGGTextRenderer now has an embedded transformation, which expresses the font rotation and (in future) shear settings. Removed direct support for BBitmaps from Painter (supposed to draw ServerBitmaps). Tested drawing of bitmaps other than B_RGB32. (only B_CMAP8 and B_GRAY8 so far, but they work). Right now, these colorspaces are supported by on the fly conversion. So every colorspace supported by BBitmap::ImportBits() should work, which are a lot more than the R5 app_server can display.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 18:20:45 +00:00
Stephan Aßmus
85b226041a Added B_BITMAP_NO_SERVER_LINK to the BBitmap flags. It constructs a BBitmap without a server link, which consequently cannot be drawn by the app_server, but which is nevertheless very useful. It essentially does the same thing as RUN_WITHOUT_APP_SERVER. I also added a CleanUp() function and moved the cleanup code from InitObject() there. CleanUp() is now called in the destructor, which means that the app_server now knows when to free the server side bitmap.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12814 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 18:10:20 +00:00
Axel Dörfler
6d352d08b3 Added an arch_get_caller() function that returns the caller of the calling function :-)
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 13:58:32 +00:00
Adi Oanca
e897030468 Added a new message code. It's for setting mouse event mask
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-23 17:18:59 +00:00
Axel Dörfler
47f39c93cb Merged the disk device manager module interface for file systems with the
VFS's interface, so that a file system only has to implement one interface.
As a side effect, the automatic file system detection may now work (not yet
tested, though).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-23 17:15:56 +00:00
Axel Dörfler
c45b77186b Added private libtracker headers, shared with Deskbar.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12771 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-23 00:24:17 +00:00
Rudolf Cornelissen
2dbb0e96d5 removed test remark.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12766 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-22 13:55:01 +00:00
Rudolf Cornelissen
c3e79839e0 commented out the 'old cmd' defines, fixed 3D surface define to work for DMA (and PIO after 3D add-on update I hope).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12763 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-22 12:59:42 +00:00
Stephan Aßmus
7220b138f2 fixed confusion of byteCount and charCount in ServerFont::StringWidth(), just in case anyone really uses it later. Added UTF8CountChars() to moreUTF8.h, but then I didn't need it...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 23:51:33 +00:00
Stephan Aßmus
3f513bbafe Font rendering code should be cleaner, maybe a little more efficient and better documented. Rotated text is supported again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 23:26:15 +00:00
Stephan Aßmus
2762b0cecd Work in progress... improvements on font stuff, reverted to using Painter to get the string width. Since it actually uses glyph caching, it is about 20 times faster than the implementation in ServerFont (and a about twice the time as R5). I added a StringWidth method to Painter and AGGTextRenderer which works as correct as ServerFont::StringWidth, which btw was broken, because I mixed up glyph count and byte count...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12745 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 19:52:38 +00:00
Stephan Aßmus
38c5a7b7fa Implemented StringWidth in ServerFont, updated ServerApp to use it, and removed a -1 from TextView in the char location calculation, which I didn't understand and without which the cursor location and related stuff now finally work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 17:36:55 +00:00
Stephan Aßmus
9962b67e5f DisplayDriver::DrawBitmap() takes no more region, the clipping is expected to be already set, as with all other drawing functions. Moved bitmap drawing message dispatching in the drawing messages area, where the correct clipping is set too. Moved cases for messages that don't need clipping applied, ie which don't draw anything, into the normal dispatch function. This means SetHighColor() and so on will no longer rebuild the clipping in Painter. Would be interesting to know how much performance this had cost...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-20 00:09:59 +00:00
Andrew Bachmann
42b25a64ad for libroot's trig functions we need PI2 = 2*pi, so undef the math definitions. this affects only this private header (trig.h) and the files that include it from libroot (sincos.c, tan.c). fixes sin/cos/tan problems.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12725 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-18 21:39:36 +00:00
Axel Dörfler
c1fc0493cb Added missing wctype.h header - R5 does not include this header, but its
libroot.so exports the functions declared therein.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-18 15:02:09 +00:00
Axel Dörfler
62d6961672 Renamed vm.c to vm.cpp and made all the changes to let it compile without
errors. Also made the VM headers C++ safe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-16 23:17:45 +00:00
Axel Dörfler
4393552b4d The heap is now located at 384 MB, and creates a reserved range that spans over the
following 1152 MB - that area only guarantees that the heap can grow this much before
the application need the memory for something else. And even then, the heap range
is reused from top-to-bottom, allowing for maximum heap usage. Of course, if the
memory after the heap range is not claimed yet, it can still be claimed by the heap,
too. Added new syscall to create the reserved range.
Fixed a bug in vm_delete_areas(): when it removed reserved areas, the area list
could get messed up.
Fixed a bug in resize_area(): resized areas could never be deleted (missing vm_put_area())!
resize_area() now supports reserved regions (but not perfectly yet, see ToDo items).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-16 22:15:13 +00:00
Axel Dörfler
a3e9996e9d Added support for special reserved address ranges: they will be used
only if memory becomes tight, and then the range is used from end to
start.
This is useful to reserve heap address ranges.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-15 15:56:55 +00:00
Axel Dörfler
20a6e5473b Renamed RESERVED_REGION_ID to RESERVED_AREA_ID.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-15 15:06:57 +00:00
Axel Dörfler
ccc8865ba2 Added an additional flag B_OVERCOMMITTING_AREA (currently to be specified
along the protection flags).
Changed the handling of B_STACK_AREA types and anonymous vm_areas: now
every area can overcommit if B_OVERCOMMITTING_AREA was specified.
B_STACK_AREA areas are still automatically overcommitting, but
B_KERNEL_STACK_AREA areas no longer.
vm_store_anonymous_noswap.c now only tests for guard pages if there were
any specified which is only done for B_STACK_AREA areas.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-15 15:03:44 +00:00
Axel Dörfler
d5b04e50f8 First step into a new block allocation strategy for the block_cache
(right now, it's still malloc/free, just encapsulated in an allocator class).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-13 18:18:28 +00:00
Stephan Aßmus
1db49f8a7a added a function to count the bytes in a string if the number of UTF8 chars is already known
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-13 17:30:59 +00:00
Axel Dörfler
879d9c6b6e Renamed the "blkman" module to "block_io".
Also renamed some defines and structures, although the structure and some other names are still odd.
This module should probably be moved into the kernel anyway, as it provides basic and crucial services.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-12 15:43:02 +00:00
Stephan Aßmus
9bdb0522c1 Implemented BFont::GetEscapments() float version. It is pretty rough yet, but appears to handle UTF8 correctly. The optional escapement_delta is currently ignored. I didn't touch other functionality too much, until I know more about it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-12 15:09:30 +00:00
Rudolf Cornelissen
d4189794fe more DMA 3D related engine command defines (completed).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-12 08:24:06 +00:00
Axel Dörfler
6094d89f2f Merged branches/developer/axeld/driver_recognition changed r12307:12637 into trunk.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-12 03:27:44 +00:00
Rudolf Cornelissen
50fdc6cbe7 adding 3D DMA cmd offset defines: in progress.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-11 20:25:13 +00:00
Rudolf Cornelissen
e22e2de123 added new 'register'definitions needed for largest number of acceleration engine commands ever defined simultaneously (AFAIK) (3D DMA attempt).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-10 20:16:41 +00:00
Stephan Aßmus
f6f44f5538 incorporated fix from AGG mailing list, the problem only showed on Sun hardware though...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-10 11:34:26 +00:00
DarkWyrm
cd0ddd03fb Added a code for the float version of GetEscapements()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-07 16:44:06 +00:00
Stephan Aßmus
fbf48e6437 Enabled HW acceleration for CopyRegion(). Tested on Haiku and it works. I also implemented FillRegion and InvertRegion. But using different acceleration hooks after one another freezes Haiku, app_server, the accelerant or whatever. I have no clue about accelerants, so if a knowledgable someone would have a look at AccelerantHWInterface.cpp, that'd be great. The software cursor stuff has a cosmetical bug with regards to CopyRegion() too, I don't understand it yet. I also tried to improve StringWidth() and DrawString() preformance. I confirmed that the glyph cache is actually used, but AGGTextRenderer::RenderString() is a dog.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-04 23:48:19 +00:00
DarkWyrm
4a03616356 Added a StringWidth method variant
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-04 09:40:32 +00:00
Stephan Aßmus
dd3b1653a0 rearranged some functions, removed unused ones
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-03 21:50:14 +00:00
Stephan Aßmus
924b7ab22c the clipping BRegion is now always allocated, added shortcut for determining if there is a valid clipping
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-03 21:39:03 +00:00
Axel Dörfler
b07ce77575 BDiskDeviceList now has a default value for the "useOwnLocker" argument - it defaults
to using its own locker.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-03 00:28:31 +00:00
Stefano Ceccherini
541a224df8 No need to include that stuff, a forward declaration will do
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-29 20:41:21 +00:00
Stefano Ceccherini
0405ef356f Added AS_SCREEN_GET/SET_MODE
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-29 20:28:53 +00:00
Axel Dörfler
d4112f6bc5 Applied some changes suggested by mmu_man, more to come, though:
- has_signals_pending() is not declared in Be headers, and it isn't declared in
  our KernelExport.h anymore, too
- removed snooze_etc() from KernelExport.h, as it's already defined in OS.h
  (and really exported by libroot.so).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-29 11:41:12 +00:00
Stephan Aßmus
db7226db9d work in progress to get scrolling working, so Adi can have a look, no changes to existing functionality, cleanup in Layer.cpp
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-27 17:26:57 +00:00
Axel Dörfler
b20667b35b {install|remove}_io_interrupt_handler() now correctly handle the B_NO_ENABLE_COUNTER flag.
Lots of cleanup:
- moved B_NO_ENABLE_COUNTER flag definition out of int.h to KernelExport.h, as it's
  described in the BeBook (although it's probably not really used that often :))
- int.c no longer has any platform dependent code (+ 0x20 on interrupt numbers is gone);
  it's now entirely handled in the arch/x86/ section.
- the io_vectors[] is now statically initialized, instead of allocated from the heap
- removed {install|remove}_interrupt_handler(); they weren't that useful, arch_smp_init()
  is now calling install_io_interrupt_handler() correctly instead
- introduced a new arch_int.h header file that currently contains NUM_IO_VECTORS only
  (though on x86, it also has ARCH_INTERRUPT_BASE == 0x20).
- changed the return type from {install|remove}_io_interrupt_handler() from "long" to
  "status_t"
- rearranged and cleaned the PIC initialization code, made the PIC code more prominent
- changed comments that talk about a non existing 8239 (the PIC chip is actually 8259)
- moved arch/x86/interrupts.h to the source directory, as it's not used outside
- added BeOS compatible interrupts_enabled() function, that should replace our
  equivalent (and private) are_interrupts_enabled()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-27 01:08:35 +00:00
Rudolf Cornelissen
9c3c151715 added second flag for 3D add-on indicating 2D modechanges
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-26 14:48:41 +00:00
Stephan Aßmus
93a2cfd43c Correct implementation of BView::CopyBits() in ServerWindow, implementation of CopyRegion in DisplayDriverPainter that sorts the rects topologically depending on direction and does the copy in place, obtaining a speedup of about 250%. TODO: extract the sorting algorithm so that it can be reused for the hardware accelerated version later.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-26 13:50:34 +00:00
Adi Oanca
997865348b added AS_ROOTLAYER_DO_CHANGE_WINBORDER_FEEL
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-21 18:56:53 +00:00