Java Code Examples for sun.awt.image.SurfaceManager#acceleratedSurfaceLost()

The following examples show how to use sun.awt.image.SurfaceManager#acceleratedSurfaceLost() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: D3DSurfaceData.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * We need to let the surface manager know that the surface is lost so
 * that for example BufferStrategy.contentsLost() returns correct result.
 * Normally the status of contentsLost is set in validate(), but in some
 * cases (like Swing's buffer per window) we intentionally don't call
 * validate from the toolkit thread but only check for the BS status.
 */
@Override
public void setSurfaceLost(boolean lost) {
    super.setSurfaceLost(lost);
    if (lost && offscreenImage != null) {
        SurfaceManager sm = SurfaceManager.getManager(offscreenImage);
        sm.acceleratedSurfaceLost();
    }
}
 
Example 2
Source File: D3DSurfaceData.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * We need to let the surface manager know that the surface is lost so
 * that for example BufferStrategy.contentsLost() returns correct result.
 * Normally the status of contentsLost is set in validate(), but in some
 * cases (like Swing's buffer per window) we intentionally don't call
 * validate from the toolkit thread but only check for the BS status.
 */
@Override
public void setSurfaceLost(boolean lost) {
    super.setSurfaceLost(lost);
    if (lost && offscreenImage != null) {
        SurfaceManager sm = SurfaceManager.getManager(offscreenImage);
        sm.acceleratedSurfaceLost();
    }
}
 
Example 3
Source File: D3DSurfaceData.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * We need to let the surface manager know that the surface is lost so
 * that for example BufferStrategy.contentsLost() returns correct result.
 * Normally the status of contentsLost is set in validate(), but in some
 * cases (like Swing's buffer per window) we intentionally don't call
 * validate from the toolkit thread but only check for the BS status.
 */
@Override
public void setSurfaceLost(boolean lost) {
    super.setSurfaceLost(lost);
    if (lost && offscreenImage != null) {
        SurfaceManager sm = SurfaceManager.getManager(offscreenImage);
        sm.acceleratedSurfaceLost();
    }
}
 
Example 4
Source File: D3DSurfaceData.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * We need to let the surface manager know that the surface is lost so
 * that for example BufferStrategy.contentsLost() returns correct result.
 * Normally the status of contentsLost is set in validate(), but in some
 * cases (like Swing's buffer per window) we intentionally don't call
 * validate from the toolkit thread but only check for the BS status.
 */
@Override
public void setSurfaceLost(boolean lost) {
    super.setSurfaceLost(lost);
    if (lost && offscreenImage != null) {
        SurfaceManager sm = SurfaceManager.getManager(offscreenImage);
        sm.acceleratedSurfaceLost();
    }
}
 
Example 5
Source File: D3DSurfaceData.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * We need to let the surface manager know that the surface is lost so
 * that for example BufferStrategy.contentsLost() returns correct result.
 * Normally the status of contentsLost is set in validate(), but in some
 * cases (like Swing's buffer per window) we intentionally don't call
 * validate from the toolkit thread but only check for the BS status.
 */
@Override
public void setSurfaceLost(boolean lost) {
    super.setSurfaceLost(lost);
    if (lost && offscreenImage != null) {
        SurfaceManager sm = SurfaceManager.getManager(offscreenImage);
        sm.acceleratedSurfaceLost();
    }
}
 
Example 6
Source File: D3DSurfaceData.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * We need to let the surface manager know that the surface is lost so
 * that for example BufferStrategy.contentsLost() returns correct result.
 * Normally the status of contentsLost is set in validate(), but in some
 * cases (like Swing's buffer per window) we intentionally don't call
 * validate from the toolkit thread but only check for the BS status.
 */
@Override
public void setSurfaceLost(boolean lost) {
    super.setSurfaceLost(lost);
    if (lost && offscreenImage != null) {
        SurfaceManager sm = SurfaceManager.getManager(offscreenImage);
        sm.acceleratedSurfaceLost();
    }
}
 
Example 7
Source File: D3DSurfaceData.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * We need to let the surface manager know that the surface is lost so
 * that for example BufferStrategy.contentsLost() returns correct result.
 * Normally the status of contentsLost is set in validate(), but in some
 * cases (like Swing's buffer per window) we intentionally don't call
 * validate from the toolkit thread but only check for the BS status.
 */
@Override
public void setSurfaceLost(boolean lost) {
    super.setSurfaceLost(lost);
    if (lost && offscreenImage != null) {
        SurfaceManager sm = SurfaceManager.getManager(offscreenImage);
        sm.acceleratedSurfaceLost();
    }
}
 
Example 8
Source File: D3DSurfaceData.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * We need to let the surface manager know that the surface is lost so
 * that for example BufferStrategy.contentsLost() returns correct result.
 * Normally the status of contentsLost is set in validate(), but in some
 * cases (like Swing's buffer per window) we intentionally don't call
 * validate from the toolkit thread but only check for the BS status.
 */
@Override
public void setSurfaceLost(boolean lost) {
    super.setSurfaceLost(lost);
    if (lost && offscreenImage != null) {
        SurfaceManager sm = SurfaceManager.getManager(offscreenImage);
        sm.acceleratedSurfaceLost();
    }
}
 
Example 9
Source File: D3DSurfaceData.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * We need to let the surface manager know that the surface is lost so
 * that for example BufferStrategy.contentsLost() returns correct result.
 * Normally the status of contentsLost is set in validate(), but in some
 * cases (like Swing's buffer per window) we intentionally don't call
 * validate from the toolkit thread but only check for the BS status.
 */
@Override
public void setSurfaceLost(boolean lost) {
    super.setSurfaceLost(lost);
    if (lost && offscreenImage != null) {
        SurfaceManager sm = SurfaceManager.getManager(offscreenImage);
        sm.acceleratedSurfaceLost();
    }
}
 
Example 10
Source File: D3DSurfaceData.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * We need to let the surface manager know that the surface is lost so
 * that for example BufferStrategy.contentsLost() returns correct result.
 * Normally the status of contentsLost is set in validate(), but in some
 * cases (like Swing's buffer per window) we intentionally don't call
 * validate from the toolkit thread but only check for the BS status.
 */
@Override
public void setSurfaceLost(boolean lost) {
    super.setSurfaceLost(lost);
    if (lost && offscreenImage != null) {
        SurfaceManager sm = SurfaceManager.getManager(offscreenImage);
        sm.acceleratedSurfaceLost();
    }
}
 
Example 11
Source File: D3DSurfaceData.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * We need to let the surface manager know that the surface is lost so
 * that for example BufferStrategy.contentsLost() returns correct result.
 * Normally the status of contentsLost is set in validate(), but in some
 * cases (like Swing's buffer per window) we intentionally don't call
 * validate from the toolkit thread but only check for the BS status.
 */
@Override
public void setSurfaceLost(boolean lost) {
    super.setSurfaceLost(lost);
    if (lost && offscreenImage != null) {
        SurfaceManager sm = SurfaceManager.getManager(offscreenImage);
        sm.acceleratedSurfaceLost();
    }
}
 
Example 12
Source File: D3DSurfaceData.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * We need to let the surface manager know that the surface is lost so
 * that for example BufferStrategy.contentsLost() returns correct result.
 * Normally the status of contentsLost is set in validate(), but in some
 * cases (like Swing's buffer per window) we intentionally don't call
 * validate from the toolkit thread but only check for the BS status.
 */
@Override
public void setSurfaceLost(boolean lost) {
    super.setSurfaceLost(lost);
    if (lost && offscreenImage != null) {
        SurfaceManager sm = SurfaceManager.getManager(offscreenImage);
        sm.acceleratedSurfaceLost();
    }
}
 
Example 13
Source File: D3DSurfaceData.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * We need to let the surface manager know that the surface is lost so
 * that for example BufferStrategy.contentsLost() returns correct result.
 * Normally the status of contentsLost is set in validate(), but in some
 * cases (like Swing's buffer per window) we intentionally don't call
 * validate from the toolkit thread but only check for the BS status.
 */
@Override
public void setSurfaceLost(boolean lost) {
    super.setSurfaceLost(lost);
    if (lost && offscreenImage != null) {
        SurfaceManager sm = SurfaceManager.getManager(offscreenImage);
        sm.acceleratedSurfaceLost();
    }
}