* The StrokeLine() variation that takes a rgb_color did change the drawing
state of the painter without restoring it afterwards (HighColor and DrawingMode). This function is only used in decorators, but as such it could lead to strange effects. When clicking and holding the close button on the R5 MidiPlayer for example, the background of the scope would suddenly become the color of the close buttons middle line. As the drawing mode was also overwritten this could probably have lead to text rendering issues when zooming applications. As I didn't find a easy way to reproduce such a thing, this is only theory though. * Implement the missing IsExclusiveAccessLocked() method in the DrawingEngine which is not used at the moment. If corresponding debug output is generated though, it reveals possible locking issues with CopyRegion(). * Remove an empty line in the LineArrayData struct. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25934 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6559de374d
commit
018b0c251c
@ -132,6 +132,13 @@ DrawingEngine::LockExclusiveAccess()
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
DrawingEngine::IsExclusiveAccessLocked()
|
||||
{
|
||||
return fGraphicsCard->IsExclusiveAccessLocked();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DrawingEngine::UnlockExclusiveAccess()
|
||||
{
|
||||
@ -682,9 +689,15 @@ DrawingEngine::StrokeLine(const BPoint &start, const BPoint &end,
|
||||
AutoFloatingOverlaysHider _(fGraphicsCard, touched);
|
||||
|
||||
if (!fPainter->StraightLine(start, end, color)) {
|
||||
rgb_color previousColor = fPainter->HighColor();
|
||||
drawing_mode previousMode = fPainter->DrawingMode();
|
||||
|
||||
fPainter->SetHighColor(color);
|
||||
fPainter->SetDrawingMode(B_OP_OVER);
|
||||
fPainter->StrokeLine(start, end);
|
||||
|
||||
fPainter->SetDrawingMode(previousMode);
|
||||
fPainter->SetHighColor(previousColor);
|
||||
}
|
||||
|
||||
_CopyToFront(touched);
|
||||
|
@ -32,7 +32,6 @@ typedef struct {
|
||||
BPoint pt1;
|
||||
BPoint pt2;
|
||||
rgb_color color;
|
||||
|
||||
} LineArrayData;
|
||||
|
||||
class DrawingEngine : public HWInterfaceListener {
|
||||
|
Loading…
x
Reference in New Issue
Block a user