VirtualBox

Changeset 52926 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 2, 2014 8:41:00 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
96361
Message:

ConsoleImpl: removed obsolete CONSOLE_WITH_EVENT_CACHE

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r52319 r52926  
    10011001    ComObjPtr<Progress> mptrCancelableProgress;
    10021002
    1003     /* The purpose of caching of some events is probably in order to
    1004        automatically fire them at new event listeners.  However, there is no
    1005        (longer?) any code making use of this... */
    1006 #ifdef CONSOLE_WITH_EVENT_CACHE
    1007     struct
    1008     {
    1009         /** OnMousePointerShapeChange() cache */
    1010         struct
    1011         {
    1012             bool valid;
    1013             bool visible;
    1014             bool alpha;
    1015             uint32_t xHot;
    1016             uint32_t yHot;
    1017             uint32_t width;
    1018             uint32_t height;
    1019             com::SafeArray<BYTE> shape;
    1020         } mpsc;
    1021 
    1022         /** OnMouseCapabilityChange() cache */
    1023         struct
    1024         {
    1025             bool valid;
    1026             BOOL supportsAbsolute;
    1027             BOOL supportsRelative;
    1028             BOOL needsHostCursor;
    1029         } mcc;
    1030 
    1031         /** OnKeyboardLedsChange() cache */
    1032         struct
    1033         {
    1034             bool valid;
    1035             bool numLock;
    1036             bool capsLock;
    1037             bool scrollLock;
    1038         } klc;
    1039 
    1040         void clear()
    1041         {
    1042             RT_ZERO(mcc);
    1043             RT_ZERO(klc);
    1044 
    1045             /* We cannot RT_ZERO mpsc because of shape's vtable. */
    1046             mpsc.shape.setNull();
    1047             mpsc.valid = mpsc.visible = mpsc.alpha = false;
    1048             mpsc.xHot = mpsc.yHot = mpsc.width = mpsc.height = 0;
    1049         }
    1050     } mCallbackData;
    1051 #endif
    10521003    ComPtr<IEventListener> mVmListener;
    10531004
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r52921 r52926  
    806806    unconst(mEventSource).setNull();
    807807
    808 #ifdef CONSOLE_WITH_EVENT_CACHE
    809     mCallbackData.clear();
    810 #endif
    811 
    812808    LogFlowThisFuncLeave();
    813809}
     
    63386334}
    63396335
    6340 #ifdef CONSOLE_WITH_EVENT_CACHE
    6341 /**
    6342  * @note Locks this object for writing.
    6343  */
    6344 #endif
    63456336void Console::i_onMousePointerShapeChange(bool fVisible, bool fAlpha,
    63466337                                          uint32_t xHot, uint32_t yHot,
     
    63576348    AssertComRCReturnVoid(autoCaller.rc());
    63586349
    6359 #ifdef CONSOLE_WITH_EVENT_CACHE
    6360     {
    6361         /* We need a write lock because we alter the cached callback data */
    6362         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    6363 
    6364         /* Save the callback arguments */
    6365         mCallbackData.mpsc.visible = fVisible;
    6366         mCallbackData.mpsc.alpha = fAlpha;
    6367         mCallbackData.mpsc.xHot = xHot;
    6368         mCallbackData.mpsc.yHot = yHot;
    6369         mCallbackData.mpsc.width = width;
    6370         mCallbackData.mpsc.height = height;
    6371 
    6372         /* start with not valid */
    6373         bool wasValid = mCallbackData.mpsc.valid;
    6374         mCallbackData.mpsc.valid = false;
    6375 
    6376         com::SafeArray<BYTE> aShape(ComSafeArrayInArg(pShape));
    6377         if (aShape.size() != 0)
    6378             mCallbackData.mpsc.shape.initFrom(aShape);
    6379         else
    6380             mCallbackData.mpsc.shape.resize(0);
    6381         mCallbackData.mpsc.valid = true;
    6382     }
    6383 #endif
    63846350    com::SafeArray<BYTE> aShape(ComSafeArrayInArg(pShape));
    63856351    if (!mMouse.isNull())
     
    63946360}
    63956361
    6396 #ifdef CONSOLE_WITH_EVENT_CACHE
    6397 /**
    6398  * @note Locks this object for writing.
    6399  */
    6400 #endif
    64016362void Console::i_onMouseCapabilityChange(BOOL supportsAbsolute, BOOL supportsRelative,
    64026363                                        BOOL supportsMT, BOOL needsHostCursor)
     
    64076368    AutoCaller autoCaller(this);
    64086369    AssertComRCReturnVoid(autoCaller.rc());
    6409 
    6410 #ifdef CONSOLE_WITH_EVENT_CACHE
    6411     {
    6412         /* We need a write lock because we alter the cached callback data */
    6413         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    6414 
    6415         /* save the callback arguments */
    6416         mCallbackData.mcc.supportsAbsolute = supportsAbsolute;
    6417         mCallbackData.mcc.supportsRelative = supportsRelative;
    6418         mCallbackData.mcc.needsHostCursor = needsHostCursor;
    6419         mCallbackData.mcc.valid = true;
    6420     }
    6421 #endif
    64226370
    64236371    fireMouseCapabilityChangedEvent(mEventSource, supportsAbsolute, supportsRelative, supportsMT, needsHostCursor);
     
    64546402}
    64556403
    6456 #ifdef CONSOLE_WITH_EVENT_CACHE
    6457 /**
    6458  * @note Locks this object for writing.
    6459  */
    6460 #endif
    64616404void Console::i_onKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock)
    64626405{
    64636406    AutoCaller autoCaller(this);
    64646407    AssertComRCReturnVoid(autoCaller.rc());
    6465 
    6466 #ifdef CONSOLE_WITH_EVENT_CACHE
    6467     {
    6468         /* We need a write lock because we alter the cached callback data */
    6469         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    6470 
    6471         /* save the callback arguments */
    6472         mCallbackData.klc.numLock = fNumLock;
    6473         mCallbackData.klc.capsLock = fCapsLock;
    6474         mCallbackData.klc.scrollLock = fScrollLock;
    6475         mCallbackData.klc.valid = true;
    6476     }
    6477 #endif
    64786408
    64796409    fireKeyboardLedsChangedEvent(mEventSource, fNumLock, fCapsLock, fScrollLock);
     
    75297459    else
    75307460        mVMDestroying = false;
    7531 
    7532 #ifdef CONSOLE_WITH_EVENT_CACHE
    7533     if (SUCCEEDED(rc))
    7534         mCallbackData.clear();
    7535 #endif
    75367461
    75377462    LogFlowThisFuncLeave();
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette