From 3c2ffeb0d649803884fdce5d72b091614399d439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sun, 11 Dec 2005 13:03:53 +0000 Subject: [PATCH] fixed one more drawing bug, it only showed because now the test environment uses hardware acceleration, FillRegion for the client irgnored the current clipping git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15483 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/drawing/DrawingEngine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/servers/app/drawing/DrawingEngine.cpp b/src/servers/app/drawing/DrawingEngine.cpp index 626a4dbfdb..47ba85bd4a 100644 --- a/src/servers/app/drawing/DrawingEngine.cpp +++ b/src/servers/app/drawing/DrawingEngine.cpp @@ -719,9 +719,11 @@ DrawingEngine::FillRegion(BRegion& r, const DrawState *d) && (d->GetDrawingMode() == B_OP_COPY || d->GetDrawingMode() == B_OP_OVER)) { if (d->GetPattern() == B_SOLID_HIGH) { + r.IntersectWith(fPainter->ClippingRegion()); fGraphicsCard->FillRegion(r, d->HighColor()); doInSoftware = false; } else if (d->GetPattern() == B_SOLID_LOW) { + r.IntersectWith(fPainter->ClippingRegion()); fGraphicsCard->FillRegion(r, d->LowColor()); doInSoftware = false; } @@ -755,6 +757,10 @@ DrawingEngine::FillRegion(BRegion& r, const RGBColor& color) // NOTE: Write locking because we might use HW acceleration. // This needs to be investigated, I'm doing this because of // gut feeling. + // NOTE: this is used for internal app_server use and the + // region is expected to already be intersected with the + // current clipping... it would matter only if we can + // use hardware acceleration if (WriteLock()) { BRect clipped = fPainter->ClipRect(r.Frame()); if (clipped.IsValid()) {