skip hardware acceleration for small regions, should speed up rendering of small regions in the same way it helped small rects
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16955 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -625,11 +625,13 @@ DrawingEngine::FillRegion(BRegion& r, const RGBColor& color)
|
|||||||
// gut feeling.
|
// gut feeling.
|
||||||
// NOTE: region expected to be already clipped correctly!!
|
// NOTE: region expected to be already clipped correctly!!
|
||||||
if (WriteLock()) {
|
if (WriteLock()) {
|
||||||
fGraphicsCard->HideSoftwareCursor(r.Frame());
|
BRect frame = r.Frame();
|
||||||
|
fGraphicsCard->HideSoftwareCursor(frame);
|
||||||
|
|
||||||
bool doInSoftware = true;
|
bool doInSoftware = true;
|
||||||
// try hardware optimized version first
|
// try hardware optimized version first
|
||||||
if ((fAvailableHWAccleration & HW_ACC_FILL_REGION) != 0) {
|
if ((fAvailableHWAccleration & HW_ACC_FILL_REGION) != 0
|
||||||
|
&& frame.Width() * frame.Height() > 100) {
|
||||||
fGraphicsCard->FillRegion(r, color);
|
fGraphicsCard->FillRegion(r, color);
|
||||||
doInSoftware = false;
|
doInSoftware = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user