Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4109834

Dragging windows on top of other windows leaves behind repaint garbage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P1 P1
    • None
    • 1.1.6
    • client-libs
    • sparc
    • solaris_2.5.1

      This is a 1.1.6F regression bug from Oracle.

      There is a regression bug that first appeared
      in JDK 1.1.6F. It did not exist in 1.1.6E.
      We are seeing repaint problems with even simple
      applets: dragging windows on top of other
      windows leaves behind a trail of repaint garbage.
       
      The problem seems to have been caused by a
      performance enhancement made between 1.1.6E and
      1.1.6F.
      From JDK 1.1.6F putback report (jdk116F_0128.html):
       
           Putback Comments from Jan 27, 1998 @ 12.47.15
       
           Bug: 4106598
           Synopsis: AWT clipping performance on Windows can be significantly
      improved.
           Comments: Removed the LogicalSelectClipRgn Win32 API call from
      AwtGraphics::Rele
           aseDC(). It is not necessary to reset the clip region since each thread
      calls G
           etDC or ValidateDC to set the clip region. Removing this
           call provides substantial improvement when clipping is enabled.
       
      Diffing the code shows that a clip region call has
      been commented out:
       
      Before (JDK 1.1.6E): \src\win32\sun\windows\awt_Graphics.h, Lns. 195-205
       
          INLINE void ReleaseDC() {
              if (m_pSharedDC != NULL) {
                  if (m_pSharedDC->GetComponent() != NULL) {
                      // Bug #4055623 - Performance enhancements
                      if (m_bClipping) {
                          LogicalSelectClipRgn(m_hDC, NULL);
                      }
                  }
                  m_pSharedDC->Unlock();
              }
          }
       
      After (JDK 1.1.6F): \src\win32\sun\windows\awt_Graphics.h, Lns. 195-205
       
          INLINE void ReleaseDC() {
              if (m_pSharedDC != NULL) {
                  //if (m_pSharedDC->GetComponent() != NULL) {
                      // Bug #4055623 - Performance enhancements
                   // if (m_bClipping) {
                    // LogicalSelectClipRgn(m_hDC, NULL);
                     // }
                 // } //If loop taken away for bug # 4106598
                  m_pSharedDC->Unlock();
              }
          }
       
      Please put this code back into the next version of
      JDK 1.1.6.
       
      Test case (2 files):
       
      *** BadRepaint.html ***
       
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
      <HTML>
      <BODY>
       
      <APPLET CODE="BadRepaint.class"
                  WIDTH=400
                  HEIGHT=400></APPLET>
       
      </BODY>
      </HTML>
       
      *** BadRepaint.java ***
       
      import java.applet.*;
      import java.awt.*;
       
      public class BadRepaint extends Applet
      {
          private Frame _mFrame1;
          public BadRepaint()
          {
          }
          public void start()
          {
              _mFrame1 = new Frame("Frame 1");
              _mFrame1.setBounds(100, 100, 300, 200);
              _mFrame1.setVisible(true);
          }
      }
       

            Unassigned Unassigned
            mmuellersunw Marianne Mueller (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: