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:
Stephan Aßmus
2006-04-01 16:48:28 +00:00
parent 82e704cd1b
commit 5d0c78f416
+4 -2
View File
@@ -625,11 +625,13 @@ DrawingEngine::FillRegion(BRegion& r, const RGBColor& color)
// gut feeling.
// NOTE: region expected to be already clipped correctly!!
if (WriteLock()) {
fGraphicsCard->HideSoftwareCursor(r.Frame());
BRect frame = r.Frame();
fGraphicsCard->HideSoftwareCursor(frame);
bool doInSoftware = true;
// 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);
doInSoftware = false;
}