From 5deabf720f1101b39376cb211c39f6f0c3474153 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 1 Apr 2015 16:00:20 +0200 Subject: Bug 1153 - Adopt to ArrayHashSet change, don't use deprecated ctor (gluegen commit c156343fec33ceea7f238b9766a9f4985fb92687) --- src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java | 2 +- .../wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java | 3 ++- src/newt/classes/jogamp/newt/MonitorModeProps.java | 12 ++++++------ src/newt/classes/jogamp/newt/WindowImpl.java | 2 +- src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java | 3 ++- .../classes/jogamp/newt/driver/windows/ScreenDriver.java | 5 +++-- src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java | 2 +- .../opengl/test/junit/newt/mm/TestScreenMode00aNEWT.java | 2 +- 8 files changed, 17 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java b/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java index 8254f164c..24bb995dd 100644 --- a/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java +++ b/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java @@ -317,7 +317,7 @@ public class JPEGDecoder { this.precision = precision; this.scanLines = scanLines; this.samplesPerLine = samplesPerLine; - compIDs = new ArrayHashSet(componentsCount); + compIDs = new ArrayHashSet(false, componentsCount, ArrayHashSet.DEFAULT_LOAD_FACTOR); comps = new ComponentIn[componentsCount]; this.compCount = componentsCount; this.qtt = qtt; diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java index 83e4ae472..342b4a750 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java @@ -152,7 +152,8 @@ public class WindowsAWTWGLGraphicsConfigurationFactory extends GLGraphicsConfigu // collect all available PFD IDs final GraphicsConfiguration[] configs = device.getConfigurations(); final int[] pfdIDs = new int[configs.length]; - final ArrayHashSet pfdIDOSet = new ArrayHashSet(); + final ArrayHashSet pfdIDOSet = + new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); for (int i = 0; i < configs.length; i++) { final GraphicsConfiguration gc = configs[i]; pfdIDs[i] = Win32SunJDKReflection.graphicsConfigurationGetPixelFormatID(gc); diff --git a/src/newt/classes/jogamp/newt/MonitorModeProps.java b/src/newt/classes/jogamp/newt/MonitorModeProps.java index 4e2806118..eabb6be01 100644 --- a/src/newt/classes/jogamp/newt/MonitorModeProps.java +++ b/src/newt/classes/jogamp/newt/MonitorModeProps.java @@ -158,11 +158,11 @@ public class MonitorModeProps { ; public static class Cache { - public final ArrayHashSet resolutions = new ArrayHashSet(); - public final ArrayHashSet surfaceSizes = new ArrayHashSet(); - public final ArrayHashSet sizeAndRates = new ArrayHashSet(); - public final ArrayHashSet monitorModes = new ArrayHashSet(); - public final ArrayHashSet monitorDevices = new ArrayHashSet(); + public final ArrayHashSet resolutions = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); + public final ArrayHashSet surfaceSizes = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); + public final ArrayHashSet sizeAndRates = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); + public final ArrayHashSet monitorModes = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); + public final ArrayHashSet monitorDevices = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); public final void setPrimary(final MonitorDevice p) { primary = p; } public final MonitorDevice getPrimary() { return primary;} @@ -308,7 +308,7 @@ public class MonitorModeProps { final int rotation = monitorProperties[offset++]; currentMode = getByNativeIdAndRotation(allMonitorModes, modeId, rotation); } - final ArrayHashSet supportedModes = new ArrayHashSet(); + final ArrayHashSet supportedModes = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); while( offset < limit ) { final int modeId = monitorProperties[offset++]; for (int i=0; i pointer ID (consecutive index, starting w/ 0) */ - private final ArrayHashSet pName2pID = new ArrayHashSet(); + private final ArrayHashSet pName2pID = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); private boolean defaultGestureHandlerEnabled = true; private DoubleTapScrollGesture gesture2PtrTouchScroll = null; diff --git a/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java index 1389692fc..ddeea265a 100644 --- a/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java @@ -155,7 +155,8 @@ public class ScreenDriver extends ScreenImpl { // for(int crtIdx=0; crtIdx supportedModes = new ArrayHashSet(); + final ArrayHashSet supportedModes = + new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); int modeIdx = 0; { // Get all supported modes for this monitorDevice diff --git a/src/newt/classes/jogamp/newt/driver/windows/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/windows/ScreenDriver.java index ea3e76eb3..dfdb8b155 100644 --- a/src/newt/classes/jogamp/newt/driver/windows/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/windows/ScreenDriver.java @@ -101,7 +101,8 @@ public class ScreenDriver extends ScreenImpl { @Override protected void collectNativeMonitorModesAndDevicesImpl(final MonitorModeProps.Cache cache) { - ArrayHashSet supportedModes = new ArrayHashSet(); + ArrayHashSet supportedModes = + new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); String adapterName; for(int adapterIdx=0; null != ( adapterName = getAdapterName(adapterIdx) ); adapterIdx++ ) { for(int monitorIdx=0; null != getMonitorName(adapterName, monitorIdx, true); monitorIdx++ ) { @@ -124,7 +125,7 @@ public class ScreenDriver extends ScreenImpl { MonitorModeProps.streamInMonitorDevice(cache, this, currentMode, null, supportedModes, monitorProps, 0, null); // next monitor, 1st mode - supportedModes = new ArrayHashSet(); + supportedModes = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); } } } diff --git a/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java index 2dc416063..517d229b7 100644 --- a/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java @@ -124,7 +124,7 @@ public class ScreenDriver extends ScreenImpl { final int crtCount = crt_ids.length; // Gather all available rotations - final ArrayHashSet availableRotations = new ArrayHashSet(); + final ArrayHashSet availableRotations = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); for(int i = 0; i < crtCount; i++) { final int[] rotations = rAndR.getAvailableRotations(device.getHandle(), this, crt_ids[i]); if( null != rotations ) { diff --git a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00aNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00aNEWT.java index 43206bbae..5e7ac8644 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00aNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/mm/TestScreenMode00aNEWT.java @@ -110,7 +110,7 @@ public class TestScreenMode00aNEWT extends UITestCase { final DimensionImmutable sizeMM = new Dimension(50, 50); final Rectangle viewport = new Rectangle(0, 0, 1920, 1080); - final ArrayHashSet supportedModes = new ArrayHashSet(); + final ArrayHashSet supportedModes = new ArrayHashSet(false, ArrayHashSet.DEFAULT_INITIAL_CAPACITY, ArrayHashSet.DEFAULT_LOAD_FACTOR); supportedModes.add(modeOut); final MonitorDevice monOut = new MonitorDeviceImpl(null, -1, false, true, sizeMM, modeOut, null, viewport, viewport, supportedModes); System.err.println("01 out : "+monOut); -- cgit v1.2.3