Commit: cbc1c83154fb617f3d54e669f0516bb8001c2dc8
Author: Nicholas Rishel
Date:   Sun Aug 9 17:01:01 2020 -0700
Branches: master
https://developer.blender.org/rBcbc1c83154fb617f3d54e669f0516bb8001c2dc8

Remove Wintab logging.

===================================================================

M       CMakeLists.txt
M       intern/ghost/CMakeLists.txt
M       intern/ghost/intern/GHOST_Debug.h
M       intern/ghost/intern/GHOST_SystemWin32.cpp
M       intern/ghost/intern/GHOST_WindowWin32.cpp

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9662f12613f..eb04da749ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -209,11 +209,6 @@ option(WITH_NANOVDB       "Enable usage of NanoVDB data 
structure for accelerate
 option(WITH_GHOST_DEBUG   "Enable debugging output for the GHOST library" OFF)
 mark_as_advanced(WITH_GHOST_DEBUG)
 
-if(WIN32)
-  option(WITH_WINTAB_DEBUG    "Enable debugging output for Wintab" OFF)
-  mark_as_advanced(WITH_WINTAB_DEBUG)
-endif()
-
 option(WITH_GHOST_SDL    "Enable building Blender against SDL for windowing 
rather than the native APIs" OFF)
 mark_as_advanced(WITH_GHOST_SDL)
 
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index 5d83fbec778..77e777db872 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -97,10 +97,6 @@ if(WITH_GHOST_DEBUG)
   add_definitions(-DWITH_GHOST_DEBUG)
 endif()
 
-if(WITH_WINTAB_DEBUG)
-  add_definitions(-DWITH_WINTAB_DEBUG)
-endif()
-
 if(WITH_INPUT_NDOF)
   add_definitions(-DWITH_INPUT_NDOF)
 
diff --git a/intern/ghost/intern/GHOST_Debug.h 
b/intern/ghost/intern/GHOST_Debug.h
index 49b88bdc815..424f95aa573 100644
--- a/intern/ghost/intern/GHOST_Debug.h
+++ b/intern/ghost/intern/GHOST_Debug.h
@@ -34,6 +34,9 @@
 #ifdef WITH_GHOST_DEBUG
 #  include <iostream>
 #  include <stdio.h>  //for printf()
+#endif                // WITH_GHOST_DEBUG
+
+#ifdef WITH_GHOST_DEBUG
 #  define GHOST_PRINT(x) \
     { \
       std::cout << x; \
@@ -49,17 +52,6 @@
 #  define GHOST_PRINTF(x, ...)
 #endif  // WITH_GHOST_DEBUG
 
-#ifdef WITH_WINTAB_DEBUG
-#  include <stdio.h>  //for printf()
-#  define WINTAB_PRINTF(x, ...) \
-    { \
-      printf(x, __VA_ARGS__); \
-    } \
-    (void)0
-#else   // WITH_WINTAB_DEBUG
-#  define WINTAB_PRINTF(x, ...)
-#endif  // WITH_WINTAB_DEBUG
-
 #ifdef WITH_ASSERT_ABORT
 #  include <stdio.h>   //for fprintf()
 #  include <stdlib.h>  //for abort()
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp 
b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 99ce7d54580..aa282c73c92 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -940,11 +940,9 @@ GHOST_EventButton 
*GHOST_SystemWin32::processButtonEvent(GHOST_TEventType type,
   GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)getSystem();
 
   if (type == GHOST_kEventButtonDown) {
-    WINTAB_PRINTF("%p OS button down\n", window->getHWND());
     window->updateMouseCapture(MousePressed);
   }
   else if (type == GHOST_kEventButtonUp) {
-    WINTAB_PRINTF("%p OS button up\n", window->getHWND());
     window->updateMouseCapture(MouseReleased);
   }
 
@@ -1017,18 +1015,13 @@ GHOST_TSuccess 
GHOST_SystemWin32::processWintabEvents(GHOST_TEventType type,
          * don't duplicate the prior button down as it interrupts drawing 
immediately after
          * changing a window.
          */
-        WINTAB_PRINTF("%p wintab button down", window->getHWND());
         system->pushEvent(new GHOST_EventCursor(
             info.time, GHOST_kEventCursorMove, window, info.x, info.y, 
info.tabletData));
         if (type == GHOST_kEventButtonDown && mask == info.button) {
-          WINTAB_PRINTF(" ... associated to system button\n");
           system->pushEvent(
               new GHOST_EventButton(info.time, info.type, window, info.button, 
info.tabletData));
           unhandledButton = false;
         }
-        else {
-          WINTAB_PRINTF(" ... but no system button\n");
-        }
         window->updateWintabSysBut(MousePressed);
         break;
       }
@@ -1037,16 +1030,11 @@ GHOST_TSuccess 
GHOST_SystemWin32::processWintabEvents(GHOST_TEventType type,
             info.time, GHOST_kEventCursorMove, window, info.x, info.y, 
info.tabletData));
         break;
       case GHOST_kEventButtonUp:
-        WINTAB_PRINTF("%p wintab button up", window->getHWND());
         system->pushEvent(
             new GHOST_EventButton(info.time, info.type, window, info.button, 
info.tabletData));
         if (type == GHOST_kEventButtonUp && mask == info.button) {
-          WINTAB_PRINTF(" ... associated to system button\n");
           unhandledButton = false;
         }
-        else {
-          WINTAB_PRINTF(" ... but no system button\n");
-        }
         window->updateWintabSysBut(MouseReleased);
         break;
       default:
@@ -1068,7 +1056,6 @@ GHOST_TSuccess 
GHOST_SystemWin32::processWintabEvents(GHOST_TEventType type,
   // non-mouse mapping, means that we must pessimistically generate mouse up 
events when we are
   // unsure of an association to prevent the mouse locking into a down state.
   if (unhandledButton) {
-    WINTAB_PRINTF("%p unhandled system button\n", window->getHWND());
     if (!window->wintabSysButPressed()) {
       GHOST_TInt32 x, y;
       system->getCursorPosition(x, y);
@@ -1626,21 +1613,11 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, 
UINT msg, WPARAM wParam,
         // Wintab events, processed
         
////////////////////////////////////////////////////////////////////////
         case WT_INFOCHANGE: {
-          WINTAB_PRINTF("%p WT_INFOCHANGE\n", window->getHWND());
           window->processWintabInfoChangeEvent(lParam);
           break;
         }
-        case WT_CSRCHANGE:
-          WINTAB_PRINTF("%p WT_CSRCHANGE\n", window->getHWND());
-          break;
         case WT_PROXIMITY: {
           bool inRange = LOWORD(lParam);
-          WINTAB_PRINTF(
-              "%p WT_PROXIMITY loword (!0 enter 0 leave context): %d, hiword 
(!0 enter !0 leave "
-              "hardware): %d\n",
-              window->getHWND(),
-              LOWORD(lParam),
-              HIWORD(lParam));
           window->processWintabProximityEvent(inRange);
           break;
         }
@@ -1648,31 +1625,6 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, 
UINT msg, WPARAM wParam,
           window->updatePendingWintabEvents();
           break;
         
////////////////////////////////////////////////////////////////////////
-        // Wintab events, debug
-        
////////////////////////////////////////////////////////////////////////
-        case WT_CTXOPEN:
-          WINTAB_PRINTF("%p WT_CTXOPEN\n", window->getHWND());
-          break;
-        case WT_CTXCLOSE:
-          WINTAB_PRINTF("%p WT_CTXCLOSE\n", window->getHWND());
-          break;
-        case WT_CTXUPDATE:
-          WINTAB_PRINTF("%p WT_CTXUPDATE\n", window->getHWND());
-          break;
-        case WT_CTXOVERLAP:
-          switch (lParam) {
-            case CXS_DISABLED:
-              WINTAB_PRINTF("%p WT_CTXOVERLAP CXS_DISABLED\n", 
window->getHWND());
-              break;
-            case CXS_OBSCURED:
-              WINTAB_PRINTF("%p WT_CTXOVERLAP CXS_OBSCURED\n", 
window->getHWND());
-              break;
-            case CXS_ONTOP:
-              WINTAB_PRINTF("%p WT_CTXOVERLAP CXS_ONTOP\n", window->getHWND());
-              break;
-          }
-          break;
-        
////////////////////////////////////////////////////////////////////////
         // Pointer events, processed
         
////////////////////////////////////////////////////////////////////////
         case WM_POINTERENTER:
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp 
b/intern/ghost/intern/GHOST_WindowWin32.cpp
index e1ecec8081a..bc6f8cf2585 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -796,7 +796,6 @@ void 
GHOST_WindowWin32::updateWintabSysBut(GHOST_MouseCaptureEventWin32 event)
     case OperatorUngrab:
       break;
   }
-  WINTAB_PRINTF("%p %d system buttons\n", m_hWnd, m_wintab.numSysButtons);
 }
 
 HCURSOR GHOST_WindowWin32::getStandardCursor(GHOST_TStandardCursor shape) const
@@ -1014,8 +1013,6 @@ void GHOST_WindowWin32::updateWintab(bool active, bool 
visible)
     m_wintab.enable(m_wintab.context, enable);
     m_wintab.overlap(m_wintab.context, overlap);
 
-    WINTAB_PRINTF("%p updateWintab enable: %d, overlap: %d\n", m_hWnd, enable, 
overlap);
-
     if (!overlap) {
       // WT_PROXIMITY event doesn't occur unless tablet's cursor leaves the 
proximity while the
       // window is active.
@@ -1030,10 +1027,6 @@ void GHOST_WindowWin32::initializeWintab()
 {
   // return if wintab library handle doesn't exist or wintab is already 
initialized
   if (!m_wintab.handle || m_wintab.context) {
-    WINTAB_PRINTF("%p initializeWintab() handle: %p, context: %p\n",
-           m_hWnd,
-           m_wintab.handle,
-           m_wintab.context);
     return;
   }
 
@@ -1057,27 +1050,12 @@ void GHOST_WindowWin32::initializeWintab()
     // Invert to match Windows y origin mapping to the screen top
     lc.lcOutExtY = -lc.lcOutExtY;
 
-    WINTAB_PRINTF("lcOutOrgX: %d, lcOutOrgY: %d, lcOutExtX: %d, lcOutExtY: 
%d\n",
-           lc.lcOutOrgX,
-           lc.lcOutOrgY,
-           lc.lcOutExtX,
-           lc.lcOutExtY);
-    WINTAB_PRINTF("left: %d, top: %d, width: %d, height: %d\n",
-           ::GetSystemMetrics(SM_XVIRTUALSCREEN),
-           ::GetSystemMetrics(SM_YVIRTUALSCREEN),
-           ::GetSystemMetrics(SM_CXVIRTUALSCREEN),
-           ::GetSystemMetrics(SM_CYVIRTUALSCREEN));
-
     m_wintab.info(WTI_INTERFACE, IFC_NDEVICES, &m_wintab.numDevices);
 
-    WINTAB_PRINTF("initializeWintab numDevices: %d\n", m_wintab.numDevices);
-
     /* get the max pressure, to divide into a float */
     BOOL pressureSupport = m_wintab.info(WTI_DEVICES, DVC_NPRESSURE, 
&Pressure);
     m_wintab.maxPressure = pressureSupport ? Pressure.axMax : 0;
 
-    WINTAB_PRINTF("initializeWintab maxPressure: %d\n", m_wintab.maxPressure);
-
     /* get the max tilt axes, to divide into floats */
     BOOL tiltSupport = m_wintab.info(WTI_DEVICES, DVC_ORIENTATION, 
&Orientation);
     /* does the tablet support azimuth ([0]) and altitude ([1]) */
@@ -1086,9 +1064,6 @@ void GHOST_WindowWin32::initializeWintab()
       m_wintab.maxAzimuth = Orientation[0].axMax;
       m_wintab.maxAltitude = Orientation[1].axMax;
 
-      WINTAB_PRINTF("initializeWintab maxAzimuth: %d, maxAltitude: %d\n",
-             m_wintab.maxAzimuth,
-             m_wintab.maxAltitude);
     }
     else { /* no so dont do tilt stuff */
       m_wintab.maxAzimuth = m_wintab.maxAltitude = 0;
@@ -1097,13 +1072,6 @@ void GHOST_WindowWi

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to