IrixDMJpegCompressor is now preferred to IrixCLJpegCompressor. Debugging behavior was either removed or made dependent on the DEBUG_FORCE_CL define. This define allows testing of Irix CL software-only JPEG compressor which normally would not be used.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2377 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/JpegEncoder.cxx b/common/rfb/JpegEncoder.cxx
index 1d9b3c7..f3dbdee 100644
--- a/common/rfb/JpegEncoder.cxx
+++ b/common/rfb/JpegEncoder.cxx
@@ -45,7 +45,24 @@
 
 JpegEncoder::JpegEncoder(SMsgWriter* writer_) : writer(writer_), jcomp(0)
 {
-  // FIXME: DM should be preferred over CL.
+#ifdef HAVE_DMEDIA
+#ifdef DEBUG_FORCE_CL
+    vlog.debug("DEBUG: skipping IRIX DM JPEG compressor");
+#else
+  if (!jcomp && useHardwareJPEG) {
+    vlog.debug("trying IRIX DM JPEG compressor");
+    IrixDMJpegCompressor *dmComp = new IrixDMJpegCompressor;
+    if (dmComp->isValid()) {
+      vlog.debug("initialized IRIX DM JPEG compressor successfully");
+      jcomp = dmComp;
+    } else {
+      vlog.error("warning: could not create IRIX DM JPEG compressor");
+      delete dmComp;
+    }
+  }
+#endif
+#endif
+
 #ifdef HAVE_CL
   if (!jcomp && useHardwareJPEG) {
     vlog.debug("trying IRIX CL JPEG compressor");
@@ -59,19 +76,7 @@
     }
   }
 #endif
-#ifdef HAVE_DMEDIA
-  if (!jcomp && useHardwareJPEG) {
-    vlog.debug("trying IRIX DM JPEG compressor");
-    IrixDMJpegCompressor *dmComp = new IrixDMJpegCompressor;
-    if (dmComp->isValid()) {
-      vlog.debug("initialized IRIX DM JPEG compressor successfully");
-      jcomp = dmComp;
-    } else {
-      vlog.error("warning: could not create IRIX DM JPEG compressor");
-      delete dmComp;
-    }
-  }
-#endif
+
   if (!jcomp) {
     if (useHardwareJPEG) {
       vlog.info("no hardware JPEG compressor available");