* implement FillRect() with B_OP_INVERT using hardware acceleration like
FillRegion() is already doing (untested) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22059 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
53fca955e6
commit
561844529d
@ -811,7 +811,7 @@ DrawingEngine::FillRect(BRect r)
|
||||
|| cursorTouched);
|
||||
doInSoftware = false;
|
||||
} else if (fPainter->Pattern() == B_SOLID_LOW
|
||||
&& fPainter->DrawingMode() == B_OP_COPY) {
|
||||
&& fPainter->DrawingMode() == B_OP_COPY) {
|
||||
BRegion region(r);
|
||||
region.IntersectWith(fPainter->ClippingRegion());
|
||||
fGraphicsCard->FillRegion(region, fPainter->LowColor(),
|
||||
@ -821,6 +821,16 @@ DrawingEngine::FillRect(BRect r)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (doInSoftware && fAvailableHWAccleration & HW_ACC_INVERT_REGION
|
||||
&& fPainter->Pattern() == B_SOLID_HIGH
|
||||
&& fPainter->DrawingMode() == B_OP_INVERT) {
|
||||
BRegion region(r);
|
||||
region.IntersectWith(fPainter->ClippingRegion());
|
||||
fGraphicsCard->InvertRegion(region);
|
||||
doInSoftware = false;
|
||||
}
|
||||
|
||||
if (doInSoftware) {
|
||||
fPainter->FillRect(r);
|
||||
|
||||
@ -854,7 +864,7 @@ DrawingEngine::FillRegion(BRegion& r)
|
||||
|| cursorTouched);
|
||||
doInSoftware = false;
|
||||
} else if (fPainter->Pattern() == B_SOLID_LOW
|
||||
&& fPainter->DrawingMode() == B_OP_COPY) {
|
||||
&& fPainter->DrawingMode() == B_OP_COPY) {
|
||||
r.IntersectWith(fPainter->ClippingRegion());
|
||||
fGraphicsCard->FillRegion(r, fPainter->LowColor(),
|
||||
fSuspendSyncLevel == 0
|
||||
@ -864,8 +874,8 @@ DrawingEngine::FillRegion(BRegion& r)
|
||||
}
|
||||
|
||||
if (doInSoftware && fAvailableHWAccleration & HW_ACC_INVERT_REGION
|
||||
&& fPainter->Pattern() == B_SOLID_HIGH
|
||||
&& fPainter->DrawingMode() == B_OP_INVERT) {
|
||||
&& fPainter->Pattern() == B_SOLID_HIGH
|
||||
&& fPainter->DrawingMode() == B_OP_INVERT) {
|
||||
r.IntersectWith(fPainter->ClippingRegion());
|
||||
fGraphicsCard->InvertRegion(r);
|
||||
doInSoftware = false;
|
||||
|
Loading…
Reference in New Issue
Block a user