Make BView::PopState() (executed at least on every call to Draw()) a lot
cheaper by preventing to rebuild the clipping on the app_server side. I think this was commented out, because user clipping was broken until some point and I forgot to reenable it after I fixed it. At least I cannot spot any regressions when running with this patch now would I expect to see regressions, since DrawStates do not mess with the screen clipping, unless they get a clipping region assigned when the (user) clipping changes during the state's life time. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29773 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -341,6 +341,13 @@ DrawState::HasClipping() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
DrawState::HasAdditionalClipping() const
|
||||||
|
{
|
||||||
|
return fClippingRegion != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
DrawState::GetCombinedClippingRegion(BRegion* region) const
|
DrawState::GetCombinedClippingRegion(BRegion* region) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ public:
|
|||||||
void SetClippingRegion(const BRegion* region);
|
void SetClippingRegion(const BRegion* region);
|
||||||
|
|
||||||
bool HasClipping() const;
|
bool HasClipping() const;
|
||||||
|
bool HasAdditionalClipping() const;
|
||||||
bool GetCombinedClippingRegion(BRegion* region) const;
|
bool GetCombinedClippingRegion(BRegion* region) const;
|
||||||
|
|
||||||
// coordinate transformations
|
// coordinate transformations
|
||||||
|
|||||||
@@ -1260,7 +1260,7 @@ View::PopState()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool rebuildClipping = true; //fDrawState->ClippingRegion() != NULL;
|
bool rebuildClipping = fDrawState->HasAdditionalClipping();
|
||||||
|
|
||||||
fDrawState = fDrawState->PopState();
|
fDrawState = fDrawState->PopState();
|
||||||
fDrawState->SetSubPixelPrecise(fFlags & B_SUBPIXEL_PRECISE);
|
fDrawState->SetSubPixelPrecise(fFlags & B_SUBPIXEL_PRECISE);
|
||||||
|
|||||||
Reference in New Issue
Block a user