]> source.dussan.org Git - tigervnc.git/commitdiff
Removed the possibility to choose the scale filter in the options dialog of vncviewer.
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 5 Nov 2007 14:28:40 +0000 (14:28 +0000)
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 5 Nov 2007 14:28:40 +0000 (14:28 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2366 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/ScaledPixelBuffer.cxx
win/vncviewer/CConn.cxx
win/vncviewer/CConnOptions.cxx
win/vncviewer/CConnOptions.h
win/vncviewer/OptionsDialog.cxx
win/vncviewer/resource.h
win/vncviewer/vncviewer.rc

index 12658f7b22755423b0189e3b1af9c80e15251347..e45274e453f1b1c9e975c42f9edc5e2626de33d7 100644 (file)
@@ -30,7 +30,7 @@ using namespace rfb;
 
 ScaledPixelBuffer::ScaledPixelBuffer(U8 **src_data_, int src_width_,
                                      int src_height_, int scale_, PixelFormat pf_)
-  : scale(scale_), scale_ratio_x(1), scale_ratio_y(1), scaleFilterID(scaleFilterBicubic),
+  : scale(scale_), scale_ratio_x(1), scale_ratio_y(1), scaleFilterID(scaleFilterBilinear),
     xWeightTabs(0), yWeightTabs(0), scaled_data(0), raccum(0), gaccum(0), baccum(0) {
 
   setSourceBuffer(src_data_, src_width_, src_height_);
@@ -39,7 +39,7 @@ ScaledPixelBuffer::ScaledPixelBuffer(U8 **src_data_, int src_width_,
 
 ScaledPixelBuffer::ScaledPixelBuffer() 
   : src_width(0), src_height(0), scaled_width(0), scaled_height(0), scale(100), 
-    scale_ratio_x(1), scale_ratio_y(1), scaleFilterID(scaleFilterBicubic),
+    scale_ratio_x(1), scale_ratio_y(1), scaleFilterID(scaleFilterBilinear),
     xWeightTabs(0), yWeightTabs(0), src_data(0), scaled_data(0), raccum(0),
     gaccum(0), baccum(0) {
   memset(&pf, 0, sizeof(pf));
index 53a16d06b116be52a002c7b743c2ceb3085f8767..4a9b341a0f82e0f6b402ac36b808b9dadb8f35a2 100644 (file)
@@ -158,7 +158,6 @@ CConn::applyOptions(CConnOptions& opt) {
     window->setDisableWinKeys(options.disableWinKeys);
     window->setShowToolbar(options.showToolbar);
     window->printScale();
-    window->setDesktopScaleFilter(options.scaleFilter);
     if (options.autoScaling) {
       window->setAutoScaling(true);
     } else {
index 3af422ee509b7439596060efe9ae3b839e3a092c..ea0941e5b09f931a857d67feb533da017f02f2cc 100644 (file)
@@ -123,10 +123,6 @@ static BoolParameter autoScaling("AutoScaling",
 static IntParameter scale("Scale", 
                           "Scale local copy of the remote desktop, in percent",
                           100);
-static IntParameter scaleFilter("ScaleFilter", 
-                                "Filter used for the remote desktop scaling. "
-                                "0 = Nearest Neighbor, 1 = Bilinear, 2 = Bicubic, 3 = Sinc.",
-                                rfb::defaultScaleFilter);
 
 CConnOptions::CConnOptions()
 : useLocalCursor(::useLocalCursor), useDesktopResize(::useDesktopResize),
@@ -138,7 +134,7 @@ lowColourLevel(::lowColourLevel), pointerEventInterval(ptrEventInterval),
 emulate3(::emulate3), monitor(::monitor.getData()), showToolbar(::showToolbar),
 customCompressLevel(::customCompressLevel), compressLevel(::compressLevel), 
 noJpeg(::noJpeg), qualityLevel(::qualityLevel), passwordFile(::passwordFile.getData()),
-autoReconnect(::autoReconnect), autoScaling(::autoScaling), scale(::scale), scaleFilter(::scaleFilter)
+autoReconnect(::autoReconnect), autoScaling(::autoScaling), scale(::scale)
 {
   if (autoSelect) {
     preferredEncoding = encodingZRLE;
@@ -280,11 +276,6 @@ void CConnOptions::readFromFile(const char* filename) {
             autoScaling = atoi(value.buf);
           } else if (stricmp(name.buf, "Scale") == 0) {
             scale = atoi(value.buf);
-          } else if (stricmp(name.buf, "ScaleFilter") == 0) {
-            int scaleFilterID = atoi(value.buf);
-            if (scaleFilterID > rfb::scaleFilterMaxNumber || scaleFilterID < 0 ) {
-              scaleFilter = rfb::defaultScaleFilter;
-            } else scaleFilter = scaleFilterID;
           }
         }
       }
@@ -368,7 +359,6 @@ void CConnOptions::writeToFile(const char* filename) {
     fprintf(f, "QualityLevel=%d\n", qualityLevel);
     fprintf(f, "AutoScaling=%d\n", (int)autoScaling);
     fprintf(f, "Scale=%d\n", scale);
-    fprintf(f, "ScaleFilter=%d\n", scaleFilter);
     fclose(f); f=0;
 
     setConfigFileName(filename);
@@ -410,7 +400,6 @@ void CConnOptions::writeDefaults() {
   key.setInt(_T("QualityLevel"), qualityLevel);
   key.setBool(_T("AutoScaling"), autoScaling);
   key.setInt(_T("Scale"), scale);
-  key.setInt(_T("ScaleFilter"), scaleFilter);
 }
 
 
@@ -474,7 +463,6 @@ CConnOptions& CConnOptions::operator=(const CConnOptions& o) {
   qualityLevel = o.qualityLevel;
   autoScaling = o.autoScaling;
   scale = o.scale;
-  scaleFilter = o.scaleFilter;
 
   return *this;
 }
index 0b8b2bfe83d4351c2db1063b35bb538aca785538..51ab78af5a1c972e692d4b2b7b59024819b63463 100644 (file)
@@ -68,7 +68,6 @@ namespace rfb {
       bool acceptBell;
       bool autoScaling;
       int scale;
-      unsigned int scaleFilter;
       CharArray userName;
       void setUserName(const char* user);
       PlainPasswd password;
index 962767fddd6db43deef7d17c4b2eed8ef46d8d02..826781d67a0f14558ddc1e4b5191e2b3d3e2d88e 100644 (file)
@@ -176,14 +176,6 @@ public:
     } else {
       SetDlgItemInt(handle, IDC_COMBO_SCALE, dlg->options.scale, FALSE);
     }
-    HWND hScaleFilterCombo = GetDlgItem(handle, IDC_COMBO_SCALE_FILTER);
-    SendMessage(hScaleFilterCombo, CB_RESETCONTENT, 0, 0);
-    ScaleFilters scaleFilters;
-    for (i = 0; i <= rfb::scaleFilterMaxNumber; i++) {
-      SendMessage(hScaleFilterCombo, CB_ADDSTRING, (WPARAM)0, (LPARAM)(int FAR*)scaleFilters[i].name);
-    }
-    SendMessage(hScaleFilterCombo, CB_SETCURSEL, (WPARAM)dlg->options.scaleFilter, (LPARAM)0);
-    if (dlg->options.scale == 100 && !dlg->options.autoScaling) enableItem(IDC_COMBO_SCALE_FILTER, 0);
   }
   virtual bool onOk() {
     dlg->options.shared = isItemChecked(IDC_CONN_SHARED);
@@ -205,12 +197,6 @@ public:
         dlg->options.autoScaling = true;
       }
     }
-    int scaleFilterID = SendMessage(GetDlgItem(handle, IDC_COMBO_SCALE_FILTER), CB_GETCURSEL, 0, 0);
-    if (scaleFilterID != rfb::scaleFilterBilinear &&  scaleFilterID != rfb::scaleFilterBicubic) {
-      MsgBox(handle, "Now supported only bilinear and bicubic scale filters.", MB_OK);
-    } else {
-      dlg->options.scaleFilter = SendMessage(GetDlgItem(handle, IDC_COMBO_SCALE_FILTER), CB_GETCURSEL, 0, 0);
-    }
     ((ViewerOptions*)propSheet)->setChanged();
     return true;
   }
@@ -225,8 +211,6 @@ public:
         } else {
           GetDlgItemText(handle, IDC_COMBO_SCALE, scaleStr, 20);
         }
-        if (strcmp(scaleStr, "100") == 0) enableItem(IDC_COMBO_SCALE_FILTER, 0);
-        else enableItem(IDC_COMBO_SCALE_FILTER, 1);
         return true;
       }
     }
index 362d56ec8474daf66c5b9e1ef42e3bf4cb5a510b..5bc4bdc07f1eec420622e20964af2c56a4aa57dc 100644 (file)
 #define IDC_STATIC_SCALE                1097
 #define IDC_COMBO_SCALE                 1098
 #define IDC_STATIC_PERCENT              1099
-#define IDC_COMBO_SCALE_FILTER          1100
-#define IDC_SCALE_FILTER                1101
 #define ID_TOOLBAR                      40002
 #define ID_CLOSE                        40003
 #define ID_OPTIONS                      40004
index ae479c1d32d331e5f9f76b52063c023a650596e4..e2064b31afe2befe21bf2279c09b42c46627bffd 100644 (file)
@@ -234,12 +234,8 @@ BEGIN
                     WS_TABSTOP,106,25,103,15
     COMBOBOX        IDC_COMBO_SCALE,138,40,42,134,CBS_DROPDOWN | CBS_SORT | 
                     WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_COMBO_SCALE_FILTER,138,70,71,113,CBS_DROPDOWNLIST | 
-                    WS_VSCROLL | WS_TABSTOP
     LTEXT           "Scale by:",IDC_STATIC_SCALE,106,40,32,15,SS_CENTERIMAGE
     LTEXT           "%",IDC_STATIC_PERCENT,185,40,24,15,SS_CENTERIMAGE
-    LTEXT           "With filter:",IDC_SCALE_FILTER,138,55,71,15,
-                    SS_CENTERIMAGE
 END
 
 IDD_INPUTS DIALOG DISCARDABLE  0, 0, 186, 162