Java Code Examples for sun.java2d.SurfaceData#flush()
The following examples show how to use
sun.java2d.SurfaceData#flush() .
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: CWarningWindow.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private void replaceSurface() { SurfaceData oldData = contentView.getSurfaceData(); replaceSurfaceData(); if (oldData != null && oldData != contentView.getSurfaceData()) { oldData.flush(); } }
Example 2
Source File: VolatileSurfaceManager.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Releases any associated hardware memory for this image by * calling flush on sdAccel. This method forces a lostSurface * situation so any future operations on the image will need to * revalidate the image first. */ public void flush() { lostSurface = true; SurfaceData oldSD = sdAccel; sdAccel = null; if (oldSD != null) { oldSD.flush(); } }
Example 3
Source File: CWarningWindow.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private void replaceSurface() { SurfaceData oldData = contentView.getSurfaceData(); replaceSurfaceData(); if (oldData != null && oldData != contentView.getSurfaceData()) { oldData.flush(); } }
Example 4
Source File: VolatileSurfaceManager.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Releases any associated hardware memory for this image by * calling flush on sdAccel. This method forces a lostSurface * situation so any future operations on the image will need to * revalidate the image first. */ public void flush() { lostSurface = true; SurfaceData oldSD = sdAccel; sdAccel = null; if (oldSD != null) { oldSD.flush(); } }
Example 5
Source File: VolatileSurfaceManager.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Releases any associated hardware memory for this image by * calling flush on sdAccel. This method forces a lostSurface * situation so any future operations on the image will need to * revalidate the image first. */ public void flush() { lostSurface = true; SurfaceData oldSD = sdAccel; sdAccel = null; if (oldSD != null) { oldSD.flush(); } }
Example 6
Source File: CWarningWindow.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private void replaceSurface() { SurfaceData oldData = contentView.getSurfaceData(); replaceSurfaceData(); if (oldData != null && oldData != contentView.getSurfaceData()) { oldData.flush(); } }
Example 7
Source File: VolatileSurfaceManager.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Releases any associated hardware memory for this image by * calling flush on sdAccel. This method forces a lostSurface * situation so any future operations on the image will need to * revalidate the image first. */ public void flush() { lostSurface = true; SurfaceData oldSD = sdAccel; sdAccel = null; if (oldSD != null) { oldSD.flush(); } }
Example 8
Source File: VolatileSurfaceManager.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Releases any associated hardware memory for this image by * calling flush on sdAccel. This method forces a lostSurface * situation so any future operations on the image will need to * revalidate the image first. */ public void flush() { lostSurface = true; SurfaceData oldSD = sdAccel; sdAccel = null; if (oldSD != null) { oldSD.flush(); } }
Example 9
Source File: VolatileSurfaceManager.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Releases any associated hardware memory for this image by * calling flush on sdAccel. This method forces a lostSurface * situation so any future operations on the image will need to * revalidate the image first. */ public void flush() { lostSurface = true; SurfaceData oldSD = sdAccel; sdAccel = null; if (oldSD != null) { oldSD.flush(); } }
Example 10
Source File: CWarningWindow.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private void replaceSurface() { SurfaceData oldData = contentView.getSurfaceData(); replaceSurfaceData(); if (oldData != null && oldData != contentView.getSurfaceData()) { oldData.flush(); } }
Example 11
Source File: CWarningWindow.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private void replaceSurface() { SurfaceData oldData = contentView.getSurfaceData(); replaceSurfaceData(); if (oldData != null && oldData != contentView.getSurfaceData()) { oldData.flush(); } }
Example 12
Source File: CWarningWindow.java From hottub with GNU General Public License v2.0 | 5 votes |
private void replaceSurface() { SurfaceData oldData = contentView.getSurfaceData(); replaceSurfaceData(); if (oldData != null && oldData != contentView.getSurfaceData()) { oldData.flush(); } }
Example 13
Source File: VolatileSurfaceManager.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Releases any associated hardware memory for this image by * calling flush on sdAccel. This method forces a lostSurface * situation so any future operations on the image will need to * revalidate the image first. */ public void flush() { lostSurface = true; SurfaceData oldSD = sdAccel; sdAccel = null; if (oldSD != null) { oldSD.flush(); } }
Example 14
Source File: CWarningWindow.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
private void replaceSurface() { SurfaceData oldData = contentView.getSurfaceData(); replaceSurfaceData(); if (oldData != null && oldData != contentView.getSurfaceData()) { oldData.flush(); } }
Example 15
Source File: WComponentPeer.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Multi-buffer version of replaceSurfaceData. This version is called * by createBuffers(), which needs to acquire the same locks in the same * order, but also needs to perform additional functions inside the * locks. */ public void replaceSurfaceData(int newNumBackBuffers, BufferCapabilities caps) { SurfaceData oldData = null; VolatileImage oldBB = null; synchronized(((Component)target).getTreeLock()) { synchronized(this) { if (pData == 0) { return; } numBackBuffers = newNumBackBuffers; ScreenUpdateManager mgr = ScreenUpdateManager.getInstance(); oldData = surfaceData; mgr.dropScreenSurface(oldData); createScreenSurface(true); if (oldData != null) { oldData.invalidate(); } oldBB = backBuffer; if (numBackBuffers > 0) { // set the caps first, they're used when creating the bb backBufferCaps = caps; Win32GraphicsConfig gc = (Win32GraphicsConfig)getGraphicsConfiguration(); backBuffer = gc.createBackBuffer(this); } else if (backBuffer != null) { backBufferCaps = null; backBuffer = null; } } } // it would be better to do this before we create new ones, // but then we'd run into deadlock issues if (oldData != null) { oldData.flush(); // null out the old data to make it collected faster oldData = null; } if (oldBB != null) { oldBB.flush(); // null out the old data to make it collected faster oldData = null; } }
Example 16
Source File: WComponentPeer.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Multi-buffer version of replaceSurfaceData. This version is called * by createBuffers(), which needs to acquire the same locks in the same * order, but also needs to perform additional functions inside the * locks. */ public void replaceSurfaceData(int newNumBackBuffers, BufferCapabilities caps) { SurfaceData oldData = null; VolatileImage oldBB = null; synchronized(((Component)target).getTreeLock()) { synchronized(this) { if (pData == 0) { return; } numBackBuffers = newNumBackBuffers; ScreenUpdateManager mgr = ScreenUpdateManager.getInstance(); oldData = surfaceData; mgr.dropScreenSurface(oldData); createScreenSurface(true); if (oldData != null) { oldData.invalidate(); } oldBB = backBuffer; if (numBackBuffers > 0) { // set the caps first, they're used when creating the bb backBufferCaps = caps; Win32GraphicsConfig gc = (Win32GraphicsConfig)getGraphicsConfiguration(); backBuffer = gc.createBackBuffer(this); } else if (backBuffer != null) { backBufferCaps = null; backBuffer = null; } } } // it would be better to do this before we create new ones, // but then we'd run into deadlock issues if (oldData != null) { oldData.flush(); // null out the old data to make it collected faster oldData = null; } if (oldBB != null) { oldBB.flush(); // null out the old data to make it collected faster oldData = null; } }
Example 17
Source File: WComponentPeer.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Multi-buffer version of replaceSurfaceData. This version is called * by createBuffers(), which needs to acquire the same locks in the same * order, but also needs to perform additional functions inside the * locks. */ public void replaceSurfaceData(int newNumBackBuffers, BufferCapabilities caps) { SurfaceData oldData = null; VolatileImage oldBB = null; synchronized(((Component)target).getTreeLock()) { synchronized(this) { if (pData == 0) { return; } numBackBuffers = newNumBackBuffers; ScreenUpdateManager mgr = ScreenUpdateManager.getInstance(); oldData = surfaceData; mgr.dropScreenSurface(oldData); createScreenSurface(true); if (oldData != null) { oldData.invalidate(); } oldBB = backBuffer; if (numBackBuffers > 0) { // set the caps first, they're used when creating the bb backBufferCaps = caps; Win32GraphicsConfig gc = (Win32GraphicsConfig)getGraphicsConfiguration(); backBuffer = gc.createBackBuffer(this); } else if (backBuffer != null) { backBufferCaps = null; backBuffer = null; } } } // it would be better to do this before we create new ones, // but then we'd run into deadlock issues if (oldData != null) { oldData.flush(); // null out the old data to make it collected faster oldData = null; } if (oldBB != null) { oldBB.flush(); // null out the old data to make it collected faster oldData = null; } }
Example 18
Source File: WComponentPeer.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * Multi-buffer version of replaceSurfaceData. This version is called * by createBuffers(), which needs to acquire the same locks in the same * order, but also needs to perform additional functions inside the * locks. */ public void replaceSurfaceData(int newNumBackBuffers, BufferCapabilities caps) { SurfaceData oldData = null; VolatileImage oldBB = null; synchronized(((Component)target).getTreeLock()) { synchronized(this) { if (pData == 0) { return; } numBackBuffers = newNumBackBuffers; ScreenUpdateManager mgr = ScreenUpdateManager.getInstance(); oldData = surfaceData; mgr.dropScreenSurface(oldData); createScreenSurface(true); if (oldData != null) { oldData.invalidate(); } oldBB = backBuffer; if (numBackBuffers > 0) { // set the caps first, they're used when creating the bb backBufferCaps = caps; Win32GraphicsConfig gc = (Win32GraphicsConfig)getGraphicsConfiguration(); backBuffer = gc.createBackBuffer(this); } else if (backBuffer != null) { backBufferCaps = null; backBuffer = null; } } } // it would be better to do this before we create new ones, // but then we'd run into deadlock issues if (oldData != null) { oldData.flush(); // null out the old data to make it collected faster oldData = null; } if (oldBB != null) { oldBB.flush(); // null out the old data to make it collected faster oldData = null; } }
Example 19
Source File: WComponentPeer.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
/** * Multi-buffer version of replaceSurfaceData. This version is called * by createBuffers(), which needs to acquire the same locks in the same * order, but also needs to perform additional functions inside the * locks. */ public void replaceSurfaceData(int newNumBackBuffers, BufferCapabilities caps) { SurfaceData oldData = null; VolatileImage oldBB = null; synchronized(((Component)target).getTreeLock()) { synchronized(this) { if (pData == 0) { return; } numBackBuffers = newNumBackBuffers; ScreenUpdateManager mgr = ScreenUpdateManager.getInstance(); oldData = surfaceData; mgr.dropScreenSurface(oldData); createScreenSurface(true); if (oldData != null) { oldData.invalidate(); } oldBB = backBuffer; if (numBackBuffers > 0) { // set the caps first, they're used when creating the bb backBufferCaps = caps; Win32GraphicsConfig gc = (Win32GraphicsConfig)getGraphicsConfiguration(); backBuffer = gc.createBackBuffer(this); } else if (backBuffer != null) { backBufferCaps = null; backBuffer = null; } } } // it would be better to do this before we create new ones, // but then we'd run into deadlock issues if (oldData != null) { oldData.flush(); // null out the old data to make it collected faster oldData = null; } if (oldBB != null) { oldBB.flush(); // null out the old data to make it collected faster oldData = null; } }
Example 20
Source File: WComponentPeer.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * Multi-buffer version of replaceSurfaceData. This version is called * by createBuffers(), which needs to acquire the same locks in the same * order, but also needs to perform additional functions inside the * locks. */ public void replaceSurfaceData(int newNumBackBuffers, BufferCapabilities caps) { SurfaceData oldData = null; VolatileImage oldBB = null; synchronized(((Component)target).getTreeLock()) { synchronized(this) { if (pData == 0) { return; } numBackBuffers = newNumBackBuffers; ScreenUpdateManager mgr = ScreenUpdateManager.getInstance(); oldData = surfaceData; mgr.dropScreenSurface(oldData); createScreenSurface(true); if (oldData != null) { oldData.invalidate(); } oldBB = backBuffer; if (numBackBuffers > 0) { // set the caps first, they're used when creating the bb backBufferCaps = caps; Win32GraphicsConfig gc = (Win32GraphicsConfig)getGraphicsConfiguration(); backBuffer = gc.createBackBuffer(this); } else if (backBuffer != null) { backBufferCaps = null; backBuffer = null; } } } // it would be better to do this before we create new ones, // but then we'd run into deadlock issues if (oldData != null) { oldData.flush(); // null out the old data to make it collected faster oldData = null; } if (oldBB != null) { oldBB.flush(); // null out the old data to make it collected faster oldData = null; } }