зеркало из https://github.com/mozilla/gecko-dev.git
Bug 9489. Remove cliprect push/pop to decrease paint time on titledbuttons. The cliprect was not doing anything useful, and was costing about 36% of titledbutton paint time. r=hyatt
This commit is contained in:
Родитель
d25432f38d
Коммит
3c49d461b2
|
@ -464,16 +464,27 @@ nsTitledButtonFrame::Paint(nsIPresContext* aPresContext,
|
|||
|
||||
mRenderer->PaintButton(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, rect);
|
||||
|
||||
|
||||
#if 0
|
||||
// Removing this code because it seriously impacts performance of
|
||||
// titled buttons without providing any visible benefit. Please
|
||||
// talk to hyatt or waterson if you think this code should be put
|
||||
// back in. Ideally, we could pessimistically create a clip rect
|
||||
// only if LayoutTitleAndImage() determines that the drawing would
|
||||
// spill outside of the available rect.
|
||||
aRenderingContext.PushState();
|
||||
PRBool clipState;
|
||||
aRenderingContext.SetClipRect(rect, nsClipCombine_kIntersect, clipState);
|
||||
#endif
|
||||
|
||||
LayoutTitleAndImage(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
|
||||
|
||||
PaintTitle(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
|
||||
PaintImage(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
|
||||
|
||||
#if 0
|
||||
aRenderingContext.PopState(clipState);
|
||||
#endif
|
||||
|
||||
/*
|
||||
aRenderingContext.SetColor(NS_RGB(0,128,0));
|
||||
|
|
Загрузка…
Ссылка в новой задаче