The app_server now updates the kernel's blue screen frame buffer on mode changes

(only the accelerant HW interface does this for now).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12897 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-05-29 20:23:00 +00:00
parent f33c8020e2
commit c88974d026
4 changed files with 38 additions and 3 deletions

View File

@ -268,7 +268,10 @@ int sys_socket(int family, int type, int proto);
/* System informations */
extern status_t _kern_get_system_info(system_info *info, size_t size);
/* Debug output */
extern void _kern_debug_output(const char *message);
extern status_t _kern_frame_buffer_update(addr_t baseAddress, int32 width,
int32 height, int32 depth, int32 bytesPerRow);
/* messaging service */
extern area_id _kern_register_messaging_service(sem_id lockingSem,

View File

@ -42,6 +42,15 @@
# define ATRACE(x) ;
#endif
// This call updates the frame buffer used by the on-screen KDL
#ifdef __HAIKU__
extern "C" status_t _kern_frame_buffer_update(void *baseAddress,
int32 width, int32 height,
int32 depth, int32 bytesPerRow);
#endif
// constructor
AccelerantHWInterface::AccelerantHWInterface()
: HWInterface(),
@ -358,6 +367,17 @@ AccelerantHWInterface::SetMode(const display_mode &mode)
if (UpdateFrameBufferConfig() != B_OK)
return B_ERROR;
// Update the frame buffer used by the on-screen KDL
#ifdef __HAIKU__
uint32 depth = (fFrameBufferConfig.bytes_per_row / fDisplayMode.virtual_width) << 3;
if (fDisplayMode.space == B_RGB15)
depth = 15;
_kern_frame_buffer_update(fFrameBufferConfig.frame_buffer,
fDisplayMode.virtual_width, fDisplayMode.virtual_height,
depth, fFrameBufferConfig.bytes_per_row);
#endif
// update backbuffer if neccessary
if (!fBackBuffer || fBackBuffer->Width() != fDisplayMode.virtual_width
|| fBackBuffer->Height() != fDisplayMode.virtual_height) {

View File

@ -193,6 +193,9 @@ console_get_size(int32 *_width, int32 *_height)
static void
console_move_cursor(int32 x, int32 y)
{
if (!frame_buffer_console_available())
return;
draw_cursor(sConsole.cursor_x, sConsole.cursor_y);
draw_cursor(x, y);
@ -204,7 +207,8 @@ console_move_cursor(int32 x, int32 y)
static void
console_put_glyph(int32 x, int32 y, uint8 glyph, uint8 attr)
{
if (x >= sConsole.columns || y >= sConsole.rows)
if (x >= sConsole.columns || y >= sConsole.rows
|| !frame_buffer_console_available())
return;
render_glyph(x, y, glyph, attr);
@ -214,7 +218,8 @@ console_put_glyph(int32 x, int32 y, uint8 glyph, uint8 attr)
static void
console_fill_glyph(int32 x, int32 y, int32 width, int32 height, uint8 glyph, uint8 attr)
{
if (x >= sConsole.columns || y >= sConsole.rows)
if (x >= sConsole.columns || y >= sConsole.rows
|| !frame_buffer_console_available())
return;
int32 left = x + width;
@ -236,6 +241,9 @@ console_fill_glyph(int32 x, int32 y, int32 width, int32 height, uint8 glyph, uin
static void
console_blit(int32 srcx, int32 srcy, int32 width, int32 height, int32 destx, int32 desty)
{
if (!frame_buffer_console_available())
return;
height *= CHAR_HEIGHT;
srcy *= CHAR_HEIGHT;
desty *= CHAR_HEIGHT;
@ -261,6 +269,9 @@ console_blit(int32 srcx, int32 srcy, int32 width, int32 height, int32 destx, int
static void
console_clear(uint8 attr)
{
if (!frame_buffer_console_available())
return;
switch (sConsole.bytes_per_pixel) {
case 1:
if (sConsole.depth >= 8) {
@ -420,7 +431,7 @@ _user_frame_buffer_update(addr_t baseAddress, int32 width, int32 height,
{
if (geteuid() != 0)
return B_NOT_ALLOWED;
if (IS_USER_ADDRESS(baseAddress))
if (IS_USER_ADDRESS(baseAddress) && baseAddress != NULL)
return B_BAD_ADDRESS;
return frame_buffer_update(baseAddress, width, height, depth, bytesPerRow);

View File

@ -34,6 +34,7 @@
#include <safemode.h>
#include <arch/system_info.h>
#include <messaging.h>
#include <frame_buffer_console.h>
#include <malloc.h>
#include <string.h>