зеркало из https://github.com/mozilla/gecko-dev.git
Bug 795833 - Add a RequestRepaint method to nsIWidgetListener and use it in the android widget instead of invalidating the view. r=roc
This commit is contained in:
Родитель
29945b3499
Коммит
0eca5d1aae
|
@ -1073,6 +1073,15 @@ nsView::DidPaintWindow()
|
|||
vm->DidPaintWindow();
|
||||
}
|
||||
|
||||
void
|
||||
nsView::RequestRepaint()
|
||||
{
|
||||
nsIPresShell* presShell = mViewManager->GetPresShell();
|
||||
if (presShell) {
|
||||
presShell->ScheduleViewManagerFlush();
|
||||
}
|
||||
}
|
||||
|
||||
nsEventStatus
|
||||
nsView::HandleEvent(nsGUIEvent* aEvent, bool aUseAttachedEvents)
|
||||
{
|
||||
|
|
|
@ -170,6 +170,7 @@ public:
|
|||
void WillPaintWindow(nsIWidget* aWidget, bool aWillSendDidPaint);
|
||||
bool PaintWindow(nsIWidget* aWidget, nsIntRegion aRegion, uint32_t aFlags);
|
||||
void DidPaintWindow();
|
||||
void RequestRepaint() MOZ_OVERRIDE;
|
||||
nsEventStatus HandleEvent(nsGUIEvent* aEvent, bool aUseAttachedEvents);
|
||||
|
||||
virtual ~nsView();
|
||||
|
|
|
@ -272,10 +272,7 @@ void
|
|||
nsWindow::RedrawAll()
|
||||
{
|
||||
if (mFocus && mFocus->mWidgetListener) {
|
||||
nsIView* view = mFocus->mWidgetListener->GetView();
|
||||
if (view && view->GetViewManager()) {
|
||||
view->GetViewManager()->InvalidateView(view);
|
||||
}
|
||||
mFocus->mWidgetListener->RequestRepaint();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -133,6 +133,11 @@ public:
|
|||
*/
|
||||
virtual void DidPaintWindow() { }
|
||||
|
||||
/**
|
||||
* Request that layout schedules a repaint on the next refresh driver tick.
|
||||
*/
|
||||
virtual void RequestRepaint() { }
|
||||
|
||||
/**
|
||||
* Handle an event.
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче