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:
parent
f33c8020e2
commit
c88974d026
@ -268,7 +268,10 @@ int sys_socket(int family, int type, int proto);
|
|||||||
/* System informations */
|
/* System informations */
|
||||||
extern status_t _kern_get_system_info(system_info *info, size_t size);
|
extern status_t _kern_get_system_info(system_info *info, size_t size);
|
||||||
|
|
||||||
|
/* Debug output */
|
||||||
extern void _kern_debug_output(const char *message);
|
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 */
|
/* messaging service */
|
||||||
extern area_id _kern_register_messaging_service(sem_id lockingSem,
|
extern area_id _kern_register_messaging_service(sem_id lockingSem,
|
||||||
|
@ -42,6 +42,15 @@
|
|||||||
# define ATRACE(x) ;
|
# define ATRACE(x) ;
|
||||||
#endif
|
#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
|
// constructor
|
||||||
AccelerantHWInterface::AccelerantHWInterface()
|
AccelerantHWInterface::AccelerantHWInterface()
|
||||||
: HWInterface(),
|
: HWInterface(),
|
||||||
@ -358,6 +367,17 @@ AccelerantHWInterface::SetMode(const display_mode &mode)
|
|||||||
if (UpdateFrameBufferConfig() != B_OK)
|
if (UpdateFrameBufferConfig() != B_OK)
|
||||||
return B_ERROR;
|
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
|
// update backbuffer if neccessary
|
||||||
if (!fBackBuffer || fBackBuffer->Width() != fDisplayMode.virtual_width
|
if (!fBackBuffer || fBackBuffer->Width() != fDisplayMode.virtual_width
|
||||||
|| fBackBuffer->Height() != fDisplayMode.virtual_height) {
|
|| fBackBuffer->Height() != fDisplayMode.virtual_height) {
|
||||||
|
@ -193,6 +193,9 @@ console_get_size(int32 *_width, int32 *_height)
|
|||||||
static void
|
static void
|
||||||
console_move_cursor(int32 x, int32 y)
|
console_move_cursor(int32 x, int32 y)
|
||||||
{
|
{
|
||||||
|
if (!frame_buffer_console_available())
|
||||||
|
return;
|
||||||
|
|
||||||
draw_cursor(sConsole.cursor_x, sConsole.cursor_y);
|
draw_cursor(sConsole.cursor_x, sConsole.cursor_y);
|
||||||
draw_cursor(x, y);
|
draw_cursor(x, y);
|
||||||
|
|
||||||
@ -204,7 +207,8 @@ console_move_cursor(int32 x, int32 y)
|
|||||||
static void
|
static void
|
||||||
console_put_glyph(int32 x, int32 y, uint8 glyph, uint8 attr)
|
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;
|
return;
|
||||||
|
|
||||||
render_glyph(x, y, glyph, attr);
|
render_glyph(x, y, glyph, attr);
|
||||||
@ -214,7 +218,8 @@ console_put_glyph(int32 x, int32 y, uint8 glyph, uint8 attr)
|
|||||||
static void
|
static void
|
||||||
console_fill_glyph(int32 x, int32 y, int32 width, int32 height, uint8 glyph, uint8 attr)
|
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;
|
return;
|
||||||
|
|
||||||
int32 left = x + width;
|
int32 left = x + width;
|
||||||
@ -236,6 +241,9 @@ console_fill_glyph(int32 x, int32 y, int32 width, int32 height, uint8 glyph, uin
|
|||||||
static void
|
static void
|
||||||
console_blit(int32 srcx, int32 srcy, int32 width, int32 height, int32 destx, int32 desty)
|
console_blit(int32 srcx, int32 srcy, int32 width, int32 height, int32 destx, int32 desty)
|
||||||
{
|
{
|
||||||
|
if (!frame_buffer_console_available())
|
||||||
|
return;
|
||||||
|
|
||||||
height *= CHAR_HEIGHT;
|
height *= CHAR_HEIGHT;
|
||||||
srcy *= CHAR_HEIGHT;
|
srcy *= CHAR_HEIGHT;
|
||||||
desty *= CHAR_HEIGHT;
|
desty *= CHAR_HEIGHT;
|
||||||
@ -261,6 +269,9 @@ console_blit(int32 srcx, int32 srcy, int32 width, int32 height, int32 destx, int
|
|||||||
static void
|
static void
|
||||||
console_clear(uint8 attr)
|
console_clear(uint8 attr)
|
||||||
{
|
{
|
||||||
|
if (!frame_buffer_console_available())
|
||||||
|
return;
|
||||||
|
|
||||||
switch (sConsole.bytes_per_pixel) {
|
switch (sConsole.bytes_per_pixel) {
|
||||||
case 1:
|
case 1:
|
||||||
if (sConsole.depth >= 8) {
|
if (sConsole.depth >= 8) {
|
||||||
@ -420,7 +431,7 @@ _user_frame_buffer_update(addr_t baseAddress, int32 width, int32 height,
|
|||||||
{
|
{
|
||||||
if (geteuid() != 0)
|
if (geteuid() != 0)
|
||||||
return B_NOT_ALLOWED;
|
return B_NOT_ALLOWED;
|
||||||
if (IS_USER_ADDRESS(baseAddress))
|
if (IS_USER_ADDRESS(baseAddress) && baseAddress != NULL)
|
||||||
return B_BAD_ADDRESS;
|
return B_BAD_ADDRESS;
|
||||||
|
|
||||||
return frame_buffer_update(baseAddress, width, height, depth, bytesPerRow);
|
return frame_buffer_update(baseAddress, width, height, depth, bytesPerRow);
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include <safemode.h>
|
#include <safemode.h>
|
||||||
#include <arch/system_info.h>
|
#include <arch/system_info.h>
|
||||||
#include <messaging.h>
|
#include <messaging.h>
|
||||||
|
#include <frame_buffer_console.h>
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user