src/share/classes/javax/swing/BufferStrategyPaintManager.java

Print this page

        

@@ -213,11 +213,11 @@
             }
         });
     }
 
     private void dispose(java.util.List<BufferInfo> bufferInfos) {
-        if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
             LOGGER.finer("BufferStrategyPaintManager disposed",
                          new RuntimeException());
         }
         if (bufferInfos != null) {
             for (BufferInfo bufferInfo : bufferInfos) {

@@ -298,11 +298,11 @@
                 bufferInfo.setInSync(false);
                 // Fall through to old rendering.
             }
         }
         // Invalid root, do what Swing has always done.
-        if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
             LOGGER.finer("prepare failed");
         }
         return super.paint(paintingComponent, bufferComponent, g, x, y, w, h);
     }
 

@@ -330,11 +330,11 @@
                 bsg.copyArea(xOffset + x, yOffset + y, w, h, deltaX,
                              deltaY);
             }
             accumulate(x + xOffset + deltaX, y + yOffset + deltaY, w, h);
         } else {
-            if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+            if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
                 LOGGER.finer("copyArea: prepare failed or not in sync");
             }
             // Prepare failed, or not in sync. By calling super.copyArea
             // we'll copy on screen. We need to flush any pending paint to
             // the screen otherwise we'll do a copyArea on the wrong thing.

@@ -358,19 +358,19 @@
                     wait();
                 } catch (InterruptedException ie) {
                 }
             }
         }
-        if (LOGGER.isLoggable(PlatformLogger.FINEST)) {
+        if (LOGGER.isLoggable(PlatformLogger.Level.FINEST)) {
             LOGGER.finest("beginPaint");
         }
         // Reset the area that needs to be painted.
         resetAccumulated();
     }
 
     public void endPaint() {
-        if (LOGGER.isLoggable(PlatformLogger.FINEST)) {
+        if (LOGGER.isLoggable(PlatformLogger.Level.FINEST)) {
             LOGGER.finest("endPaint: region " + accumulatedX + " " +
                        accumulatedY + " " +  accumulatedMaxX + " " +
                        accumulatedMaxY);
         }
         if (painting) {

@@ -415,11 +415,11 @@
                 bsSubRegion.show(accumulatedX, accumulatedY,
                                  accumulatedMaxX, accumulatedMaxY);
                 contentsLost = bufferStrategy.contentsLost();
             }
             if (contentsLost) {
-                if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+                if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
                     LOGGER.finer("endPaint: contents lost");
                 }
                 // Shown region was bogus, mark buffer as out of sync.
                 bufferInfo.setInSync(false);
                 success = false;

@@ -509,11 +509,11 @@
             BufferInfo bufferInfo = getBufferInfo(root);
             if (bufferInfo == null) {
                 contentsLost = true;
                 bufferInfo = new BufferInfo(root);
                 bufferInfos.add(bufferInfo);
-                if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+                if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
                     LOGGER.finer("prepare: new BufferInfo: " + root);
                 }
             }
             this.bufferInfo = bufferInfo;
             if (!bufferInfo.hasBufferStrategyChanged()) {

@@ -520,11 +520,11 @@
                 bufferStrategy = bufferInfo.getBufferStrategy(true);
                 if (bufferStrategy != null) {
                     bsg = bufferStrategy.getDrawGraphics();
                     if (bufferStrategy.contentsRestored()) {
                         contentsLost = true;
-                        if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+                        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
                             LOGGER.finer("prepare: contents restored in prepare");
                         }
                     }
                 }
                 else {

@@ -533,11 +533,11 @@
                     return false;
                 }
                 if (bufferInfo.getContentsLostDuringExpose()) {
                     contentsLost = true;
                     bufferInfo.setContentsLostDuringExpose(false);
-                    if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+                    if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
                         LOGGER.finer("prepare: contents lost on expose");
                     }
                 }
                 if (isPaint && c == rootJ && x == 0 && y == 0 &&
                       c.getWidth() == w && c.getHeight() == h) {

@@ -636,11 +636,11 @@
             BufferInfo bufferInfo = bufferInfos.get(counter);
             Container biRoot = bufferInfo.getRoot();
             if (biRoot == null) {
                 // Window gc'ed
                 bufferInfos.remove(counter);
-                if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+                if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
                     LOGGER.finer("BufferInfo pruned, root null");
                 }
             }
             else if (biRoot == root) {
                 return bufferInfo;

@@ -742,11 +742,11 @@
             if (bs == null && create) {
                 bs = createBufferStrategy();
                 if (bs != null) {
                     weakBS = new WeakReference<BufferStrategy>(bs);
                 }
-                if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+                if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
                     LOGGER.finer("getBufferStrategy: created bs: " + bs);
                 }
             }
             return bs;
         }

@@ -800,11 +800,11 @@
                 return null;
             }
             BufferStrategy bs = null;
             if (SwingUtilities3.isVsyncRequested(root)) {
                 bs = createBufferStrategy(root, true);
-                if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+                if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
                     LOGGER.finer("createBufferStrategy: using vsynced strategy");
                 }
             }
             if (bs == null) {
                 bs = createBufferStrategy(root, false);

@@ -842,11 +842,11 @@
                     getCreateBufferStrategyMethod().invoke(root, 2, caps);
                     bs = (BufferStrategy)getGetBufferStrategyMethod().
                                             invoke(root);
                 } catch (InvocationTargetException ite) {
                     // Type is not supported
-                    if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+                    if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
                         LOGGER.finer("createBufferStratety failed",
                                      ite);
                     }
                 } catch (IllegalArgumentException iae) {
                     assert false;

@@ -858,11 +858,11 @@
                 try {
                     ((Window)root).createBufferStrategy(2, caps);
                     bs = ((Window)root).getBufferStrategy();
                 } catch (AWTException e) {
                     // Type not supported
-                    if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+                    if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
                         LOGGER.finer("createBufferStratety failed",
                                      e);
                     }
                 }
             }

@@ -872,11 +872,11 @@
         /**
          * Cleans up and removes any references.
          */
         public void dispose() {
             Container root = getRoot();
-            if (LOGGER.isLoggable(PlatformLogger.FINER)) {
+            if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
                 LOGGER.finer("disposed BufferInfo for: " + root);
             }
             if (root != null) {
                 root.removeComponentListener(this);
                 if (root instanceof Window) {