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:
Stephan Aßmus
2009-03-29 10:51:26 +00:00
parent dec2485ca0
commit 2e44cfce66
3 changed files with 11 additions and 3 deletions
+7
View File
@@ -341,6 +341,13 @@ DrawState::HasClipping() const
}
bool
DrawState::HasAdditionalClipping() const
{
return fClippingRegion != NULL;
}
bool
DrawState::GetCombinedClippingRegion(BRegion* region) const
{
+1
View File
@@ -65,6 +65,7 @@ public:
void SetClippingRegion(const BRegion* region);
bool HasClipping() const;
bool HasAdditionalClipping() const;
bool GetCombinedClippingRegion(BRegion* region) const;
// coordinate transformations
+1 -1
View File
@@ -1260,7 +1260,7 @@ View::PopState()
return;
}
bool rebuildClipping = true; //fDrawState->ClippingRegion() != NULL;
bool rebuildClipping = fDrawState->HasAdditionalClipping();
fDrawState = fDrawState->PopState();
fDrawState->SetSubPixelPrecise(fFlags & B_SUBPIXEL_PRECISE);