Commit c99c840e authored by Markus Stange's avatar Markus Stange
Browse files

Bug 598482 part 3 - Remove synchronous painting APIs from nsIWidget. r=roc

parent 136f7cd4
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -623,8 +623,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::InvalidateRect(NPRect *invalidRect)
  if (mWidget) {
    mWidget->Invalidate(nsIntRect(invalidRect->left, invalidRect->top,
                                  invalidRect->right - invalidRect->left,
                                  invalidRect->bottom - invalidRect->top),
                        false);
                                  invalidRect->bottom - invalidRect->top));
    return NS_OK;
  }
#endif
+1 −1
Original line number Diff line number Diff line
@@ -585,7 +585,7 @@ nsViewManager::UpdateWidgetArea(nsView *aWidgetView, nsIWidget* aWidget,
    const nsRect* r;
    for (nsRegionRectIterator iter(leftOver); (r = iter.Next());) {
      nsIntRect bounds = ViewToWidget(aWidgetView, *r);
      aWidget->Invalidate(bounds, false);
      aWidget->Invalidate(bounds);
    }
  }
}
+5 −16
Original line number Diff line number Diff line
@@ -118,8 +118,8 @@ typedef nsEventStatus (* EVENT_CALLBACK)(nsGUIEvent *event);
#endif

#define NS_IWIDGET_IID \
  { 0x6ca77c11, 0xade7, 0x4715, \
    { 0x82, 0xe0, 0xfe, 0xae, 0x42, 0xca, 0x5b, 0x1f } }
  { 0xba20ac65, 0xb2a6, 0x4052, \
    { 0xa4, 0xcb, 0x65, 0x40, 0xf8, 0x87, 0x9c, 0x55 } }
/*
 * Window shadow styles
 * Also used for the -moz-window-shadow CSS property
@@ -1021,21 +1021,10 @@ class nsIWidget : public nsISupports {
    NS_IMETHOD MakeFullScreen(bool aFullScreen) = 0;

    /**
     * Invalidate a specified rect for a widget and repaints it.
     *
     * @param aIsSynchronouse true then repaint synchronously. If false repaint later.
     * @see #Update()
     * Invalidate a specified rect for a widget so that it will be repainted
     * later.
     */

    NS_IMETHOD Invalidate(const nsIntRect & aRect, bool aIsSynchronous) = 0;

    /**
     * Force a synchronous repaint of the window if there are dirty rects.
     *
     * @see Invalidate()
     */

     NS_IMETHOD Update() = 0;
    NS_IMETHOD Invalidate(const nsIntRect & aRect) = 0;

    enum LayerManagerPersistence
    {
+1 −8
Original line number Diff line number Diff line
@@ -589,20 +589,13 @@ nsWindow::IsEnabled(bool *aState)
}

NS_IMETHODIMP
nsWindow::Invalidate(const nsIntRect &aRect,
                     bool aIsSynchronous)
nsWindow::Invalidate(const nsIntRect &aRect)
{
    AndroidGeckoEvent *event = new AndroidGeckoEvent(AndroidGeckoEvent::DRAW, aRect);
    nsAppShell::gAppShell->PostEvent(event);
    return NS_OK;
}

NS_IMETHODIMP
nsWindow::Update()
{
    return NS_OK;
}

nsWindow*
nsWindow::FindTopLevel()
{
+1 −3
Original line number Diff line number Diff line
@@ -120,9 +120,7 @@ public:
    NS_IMETHOD SetSizeMode(PRInt32 aMode);
    NS_IMETHOD Enable(bool aState);
    NS_IMETHOD IsEnabled(bool *aState);
    NS_IMETHOD Invalidate(const nsIntRect &aRect,
                          bool aIsSynchronous);
    NS_IMETHOD Update();
    NS_IMETHOD Invalidate(const nsIntRect &aRect);
    NS_IMETHOD SetFocus(bool aRaise = false);
    NS_IMETHOD GetScreenBounds(nsIntRect &aRect);
    virtual nsIntPoint WidgetToScreenOffset();
Loading