Found the problem in my hardware acceleration code (pretty lame bug...), now we have hardware accelerated single buffer mode (still with a software cursor) under Haiku, and it feels quite nice already. For me, this is the right direction to go. That being said, I still have no clue how the sync_token should work, so if someone can point me to some documentation about accelerants, particularly the cursor related stuff now, I'd be grateful!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12623 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1f112d2ae0
commit
3c6c2f8adb
@ -515,10 +515,10 @@ AccelerantHWInterface::AvailableHWAcceleration() const
|
|||||||
|
|
||||||
if (fAccScreenBlit)
|
if (fAccScreenBlit)
|
||||||
flags |= HW_ACC_COPY_REGION;
|
flags |= HW_ACC_COPY_REGION;
|
||||||
// if (fAccFillRect)
|
if (fAccFillRect)
|
||||||
// flags |= HW_ACC_FILL_REGION;
|
flags |= HW_ACC_FILL_REGION;
|
||||||
// if (fAccInvertRect)
|
if (fAccInvertRect)
|
||||||
// flags |= HW_ACC_INVERT_REGION;
|
flags |= HW_ACC_INVERT_REGION;
|
||||||
|
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
@ -529,7 +529,8 @@ AccelerantHWInterface::CopyRegion(const clipping_rect* sortedRectList,
|
|||||||
uint32 count, int32 xOffset, int32 yOffset)
|
uint32 count, int32 xOffset, int32 yOffset)
|
||||||
{
|
{
|
||||||
if (fAccScreenBlit && fAccAcquireEngine) {
|
if (fAccScreenBlit && fAccAcquireEngine) {
|
||||||
if (fAccAcquireEngine(B_2D_ACCELERATION, 0, &fSyncToken, &fEngineToken) >= B_OK) {
|
// if (fAccAcquireEngine(B_2D_ACCELERATION, 0xff, &fSyncToken, &fEngineToken) >= B_OK) {
|
||||||
|
if (fAccAcquireEngine(B_2D_ACCELERATION, 0xff, NULL, &fEngineToken) >= B_OK) {
|
||||||
|
|
||||||
// convert the rects
|
// convert the rects
|
||||||
blit_params* params = new blit_params[count];
|
blit_params* params = new blit_params[count];
|
||||||
@ -550,7 +551,8 @@ AccelerantHWInterface::CopyRegion(const clipping_rect* sortedRectList,
|
|||||||
|
|
||||||
// done
|
// done
|
||||||
if (fAccReleaseEngine)
|
if (fAccReleaseEngine)
|
||||||
fAccReleaseEngine(fEngineToken, &fSyncToken);
|
// fAccReleaseEngine(fEngineToken, &fSyncToken);
|
||||||
|
fAccReleaseEngine(fEngineToken, NULL);
|
||||||
|
|
||||||
delete[] params;
|
delete[] params;
|
||||||
}
|
}
|
||||||
@ -562,7 +564,8 @@ void
|
|||||||
AccelerantHWInterface::FillRegion(/*const*/ BRegion& region, const RGBColor& color)
|
AccelerantHWInterface::FillRegion(/*const*/ BRegion& region, const RGBColor& color)
|
||||||
{
|
{
|
||||||
if (fAccFillRect && fAccAcquireEngine) {
|
if (fAccFillRect && fAccAcquireEngine) {
|
||||||
if (fAccAcquireEngine(B_2D_ACCELERATION, 0, &fSyncToken, &fEngineToken) >= B_OK) {
|
// if (fAccAcquireEngine(B_2D_ACCELERATION, 0xff, &fSyncToken, &fEngineToken) >= B_OK) {
|
||||||
|
if (fAccAcquireEngine(B_2D_ACCELERATION, 0xff, NULL, &fEngineToken) >= B_OK) {
|
||||||
|
|
||||||
// convert the region
|
// convert the region
|
||||||
uint32 count;
|
uint32 count;
|
||||||
@ -574,7 +577,8 @@ AccelerantHWInterface::FillRegion(/*const*/ BRegion& region, const RGBColor& col
|
|||||||
|
|
||||||
// done
|
// done
|
||||||
if (fAccReleaseEngine)
|
if (fAccReleaseEngine)
|
||||||
fAccReleaseEngine(fEngineToken, &fSyncToken);
|
fAccReleaseEngine(fEngineToken, NULL);
|
||||||
|
// fAccReleaseEngine(fEngineToken, &fSyncToken);
|
||||||
|
|
||||||
delete[] fillParams;
|
delete[] fillParams;
|
||||||
}
|
}
|
||||||
@ -586,7 +590,8 @@ void
|
|||||||
AccelerantHWInterface::InvertRegion(/*const*/ BRegion& region)
|
AccelerantHWInterface::InvertRegion(/*const*/ BRegion& region)
|
||||||
{
|
{
|
||||||
if (fAccInvertRect && fAccAcquireEngine) {
|
if (fAccInvertRect && fAccAcquireEngine) {
|
||||||
if (fAccAcquireEngine(B_2D_ACCELERATION, 0, &fSyncToken, &fEngineToken) >= B_OK) {
|
// if (fAccAcquireEngine(B_2D_ACCELERATION, 0xff, &fSyncToken, &fEngineToken) >= B_OK) {
|
||||||
|
if (fAccAcquireEngine(B_2D_ACCELERATION, 0xff, NULL, &fEngineToken) >= B_OK) {
|
||||||
|
|
||||||
// convert the region
|
// convert the region
|
||||||
uint32 count;
|
uint32 count;
|
||||||
@ -598,7 +603,8 @@ AccelerantHWInterface::InvertRegion(/*const*/ BRegion& region)
|
|||||||
|
|
||||||
// done
|
// done
|
||||||
if (fAccReleaseEngine)
|
if (fAccReleaseEngine)
|
||||||
fAccReleaseEngine(fEngineToken, &fSyncToken);
|
// fAccReleaseEngine(fEngineToken, &fSyncToken);
|
||||||
|
fAccReleaseEngine(fEngineToken, NULL);
|
||||||
|
|
||||||
delete[] fillParams;
|
delete[] fillParams;
|
||||||
}
|
}
|
||||||
@ -684,10 +690,10 @@ AccelerantHWInterface::_RegionToRectParams(/*const*/ BRegion* region,
|
|||||||
|
|
||||||
for (uint32 i = 0; i < *count; i++) {
|
for (uint32 i = 0; i < *count; i++) {
|
||||||
clipping_rect r = region->RectAtInt(i);
|
clipping_rect r = region->RectAtInt(i);
|
||||||
(*params[i]).left = (uint16)r.left;
|
(*params)[i].left = (uint16)r.left;
|
||||||
(*params[i]).top = (uint16)r.top;
|
(*params)[i].top = (uint16)r.top;
|
||||||
(*params[i]).right = (uint16)r.right;
|
(*params)[i].right = (uint16)r.right;
|
||||||
(*params[i]).bottom = (uint16)r.bottom;
|
(*params)[i].bottom = (uint16)r.bottom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user