Implemented screen to screen blit and cleaned up header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12067 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -193,6 +193,7 @@ AccelerantDriver::Initialize()
|
|||||||
accSetCursorShape = (set_cursor_shape)accelerant_hook(B_SET_CURSOR_SHAPE,NULL);
|
accSetCursorShape = (set_cursor_shape)accelerant_hook(B_SET_CURSOR_SHAPE,NULL);
|
||||||
accMoveCursor = (move_cursor)accelerant_hook(B_MOVE_CURSOR,NULL);
|
accMoveCursor = (move_cursor)accelerant_hook(B_MOVE_CURSOR,NULL);
|
||||||
accShowCursor = (show_cursor)accelerant_hook(B_SHOW_CURSOR,NULL);
|
accShowCursor = (show_cursor)accelerant_hook(B_SHOW_CURSOR,NULL);
|
||||||
|
accScreenBlit = (screen_to_screen_blit)accelerant_hook(B_SCREEN_TO_SCREEN_BLIT, NULL);
|
||||||
|
|
||||||
#ifdef DRAW_TEST
|
#ifdef DRAW_TEST
|
||||||
// Commented out to remove a couple warnings
|
// Commented out to remove a couple warnings
|
||||||
@@ -1229,6 +1230,27 @@ AccelerantDriver::GetDepthFromColorspace(int space)
|
|||||||
void
|
void
|
||||||
AccelerantDriver::Blit(const BRect &src, const BRect &dest, const DrawData *d)
|
AccelerantDriver::Blit(const BRect &src, const BRect &dest, const DrawData *d)
|
||||||
{
|
{
|
||||||
|
#ifndef DISABLE_HARDWARE_ACCELERATION
|
||||||
|
if (accScreenBlit && AcquireEngine) {
|
||||||
|
if (AcquireEngine(0, 0, NULL, &mEngineToken) == B_OK) {
|
||||||
|
blit_params blitParams;
|
||||||
|
blitParams.src_left = (uint16)src.left;
|
||||||
|
blitParams.src_top = (uint16)src.top;
|
||||||
|
blitParams.dest_left = (uint16)dest.left;
|
||||||
|
blitParams.dest_top = (uint16)dest.top;
|
||||||
|
blitParams.width = (int16)src.Width() - 1;
|
||||||
|
blitParams.height = (int16)src.Height() - 1;
|
||||||
|
|
||||||
|
accScreenBlit(mEngineToken, &blitParams, 1);
|
||||||
|
|
||||||
|
if (ReleaseEngine)
|
||||||
|
ReleaseEngine(mEngineToken, NULL);
|
||||||
|
|
||||||
|
Unlock();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -39,14 +39,13 @@
|
|||||||
class ServerBitmap;
|
class ServerBitmap;
|
||||||
class ServerCursor;
|
class ServerCursor;
|
||||||
|
|
||||||
class AccelerantDriver : public DisplayDriverImpl
|
class AccelerantDriver : public DisplayDriverImpl {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
AccelerantDriver();
|
AccelerantDriver();
|
||||||
~AccelerantDriver();
|
~AccelerantDriver();
|
||||||
|
|
||||||
bool Initialize();
|
virtual bool Initialize();
|
||||||
void Shutdown();
|
virtual void Shutdown();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
virtual bool Lock(bigtime_t timeout = B_INFINITE_TIMEOUT);
|
virtual bool Lock(bigtime_t timeout = B_INFINITE_TIMEOUT);
|
||||||
@@ -97,20 +96,25 @@ protected:
|
|||||||
virtual void CopyBitmap(ServerBitmap *bitmap, const BRect &source, const BRect &dest, const DrawData *d);
|
virtual void CopyBitmap(ServerBitmap *bitmap, const BRect &source, const BRect &dest, const DrawData *d);
|
||||||
virtual void CopyToBitmap(ServerBitmap *target, const BRect &source);
|
virtual void CopyToBitmap(ServerBitmap *target, const BRect &source);
|
||||||
|
|
||||||
ServerCursor *cursor, *under_cursor;
|
ServerCursor *cursor;
|
||||||
|
ServerCursor *under_cursor;
|
||||||
BRect cursorframe;
|
BRect cursorframe;
|
||||||
|
|
||||||
int card_fd;
|
int card_fd;
|
||||||
image_id accelerant_image;
|
image_id accelerant_image;
|
||||||
GetAccelerantHook accelerant_hook;
|
GetAccelerantHook accelerant_hook;
|
||||||
engine_token *mEngineToken;
|
engine_token *mEngineToken;
|
||||||
acquire_engine AcquireEngine;
|
acquire_engine AcquireEngine;
|
||||||
release_engine ReleaseEngine;
|
release_engine ReleaseEngine;
|
||||||
|
|
||||||
|
// accelerant hooks
|
||||||
fill_rectangle accFillRect;
|
fill_rectangle accFillRect;
|
||||||
invert_rectangle accInvertRect;
|
invert_rectangle accInvertRect;
|
||||||
set_cursor_shape accSetCursorShape;
|
set_cursor_shape accSetCursorShape;
|
||||||
move_cursor accMoveCursor;
|
move_cursor accMoveCursor;
|
||||||
show_cursor accShowCursor;
|
show_cursor accShowCursor;
|
||||||
|
screen_to_screen_blit accScreenBlit;
|
||||||
|
|
||||||
frame_buffer_config mFrameBufferConfig;
|
frame_buffer_config mFrameBufferConfig;
|
||||||
int mode_count;
|
int mode_count;
|
||||||
display_mode *mode_list;
|
display_mode *mode_list;
|
||||||
|
|||||||
Reference in New Issue
Block a user