BufferedImage performance is poor on Microsoft Windows platforms, so fallback to the 1.2 implementation if the BI cannot be HW accelerated.  Also streamline some of the code by removing synchronized statements and making the method calls themselves synchronized.  Modification to the selector implementation to make it behave more like a unix selector

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4880 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/java/com/tigervnc/rfb/CMsgWriterV3.java b/java/com/tigervnc/rfb/CMsgWriterV3.java
index 430c374..8f01f3c 100644
--- a/java/com/tigervnc/rfb/CMsgWriterV3.java
+++ b/java/com/tigervnc/rfb/CMsgWriterV3.java
@@ -26,20 +26,20 @@
 
   public CMsgWriterV3(ConnParams cp_, OutStream os_) { super(cp_, os_); }
 
-  public void writeClientInit(boolean shared) {
+  synchronized public void writeClientInit(boolean shared) {
     os.writeU8(shared?1:0);
     endMsg();
   }
 
-  public void startMsg(int type) {
+  synchronized public void startMsg(int type) {
     os.writeU8(type);
   }
 
-  public void endMsg() {
+  synchronized public void endMsg() {
     os.flush();
   }
 
-  public void writeSetDesktopSize(int width, int height,
+  synchronized public void writeSetDesktopSize(int width, int height,
                                   ScreenSet layout)
 	{
 	  if (!cp.supportsSetDesktopSize)
@@ -67,7 +67,7 @@
 	  endMsg();
 	}
 
-  public void writeFence(int flags, int len, byte[] data)
+  synchronized public void writeFence(int flags, int len, byte[] data)
   {
     if (!cp.supportsFence)
       throw new Exception("Server does not support fences");
@@ -87,7 +87,7 @@
     endMsg();
   }
   
-  public void writeEnableContinuousUpdates(boolean enable,
+  synchronized public void writeEnableContinuousUpdates(boolean enable,
                                            int x, int y, int w, int h)
   {
     if (!cp.supportsContinuousUpdates)