类sun.awt.SubRegionShowable源码实例Demo

下面列出了怎么用sun.awt.SubRegionShowable的API类实例代码及写法,或者点击链接到github查看源代码。

/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
源代码7 项目: jdk8u60   文件: BufferStrategyPaintManager.java
/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
源代码8 项目: jdk8u60   文件: BufferStrategyPaintManager.java
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
源代码11 项目: openjdk-jdk8u   文件: BufferStrategyPaintManager.java
/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
源代码12 项目: openjdk-jdk8u   文件: BufferStrategyPaintManager.java
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
源代码15 项目: Bytecoder   文件: BufferStrategyPaintManager.java
/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
源代码16 项目: Bytecoder   文件: BufferStrategyPaintManager.java
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
源代码17 项目: openjdk-jdk9   文件: BufferStrategyPaintManager.java
/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
源代码18 项目: openjdk-jdk9   文件: BufferStrategyPaintManager.java
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
源代码19 项目: jdk8u-jdk   文件: BufferStrategyPaintManager.java
/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
源代码20 项目: jdk8u-jdk   文件: BufferStrategyPaintManager.java
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
源代码21 项目: Java8CN   文件: BufferStrategyPaintManager.java
/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
源代码22 项目: Java8CN   文件: BufferStrategyPaintManager.java
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
源代码23 项目: hottub   文件: BufferStrategyPaintManager.java
/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
源代码24 项目: hottub   文件: BufferStrategyPaintManager.java
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
源代码27 项目: openjdk-8   文件: BufferStrategyPaintManager.java
/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
源代码28 项目: openjdk-8   文件: BufferStrategyPaintManager.java
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
源代码29 项目: jdk8u_jdk   文件: BufferStrategyPaintManager.java
/**
 * Renders the BufferStrategy to the screen.
 *
 * @return true if successful, false otherwise.
 */
private boolean flushAccumulatedRegion() {
    boolean success = true;
    if (accumulatedX != Integer.MAX_VALUE) {
        SubRegionShowable bsSubRegion = (SubRegionShowable)bufferStrategy;
        boolean contentsLost = bufferStrategy.contentsLost();
        if (!contentsLost) {
            bsSubRegion.show(accumulatedX, accumulatedY,
                             accumulatedMaxX, accumulatedMaxY);
            contentsLost = bufferStrategy.contentsLost();
        }
        if (contentsLost) {
            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;
        }
    }
    resetAccumulated();
    return success;
}
 
源代码30 项目: jdk8u_jdk   文件: BufferStrategyPaintManager.java
/**
 * Creates the BufferStrategy.  If the appropriate system property
 * has been set we'll try for flip first and then we'll try for
 * blit.
 */
private BufferStrategy createBufferStrategy() {
    Container root = getRoot();
    if (root == null) {
        return null;
    }
    BufferStrategy bs = null;
    if (SwingUtilities3.isVsyncRequested(root)) {
        bs = createBufferStrategy(root, true);
        if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
            LOGGER.finer("createBufferStrategy: using vsynced strategy");
        }
    }
    if (bs == null) {
        bs = createBufferStrategy(root, false);
    }
    if (!(bs instanceof SubRegionShowable)) {
        // We do this for two reasons:
        // 1. So that we know we can cast to SubRegionShowable and
        //    invoke show with the minimal region to update
        // 2. To avoid the possibility of invoking client code
        //    on the toolkit thread.
        bs = null;
    }
    return bs;
}
 
 类所在包
 类方法
 同包方法