Changeset 22836 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Sep 8, 2009 12:57:09 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 52067
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxFBOverlay.h
r22834 r22836 965 965 }; 966 966 967 #define VBOXVHWACMDPIPEC_NEWEVENT 0x00000001 968 #define VBOXVHWACMDPIPEC_COMPLETEEVENT 0x00000002 967 969 class VBoxVHWACommandElementProcessor 968 970 { … … 970 972 VBoxVHWACommandElementProcessor(class VBoxConsoleView *aView); 971 973 ~VBoxVHWACommandElementProcessor(); 972 void postCmd(VBOXVHWA_PIPECMD_TYPE aType, void * pvData); 974 void postCmd(VBOXVHWA_PIPECMD_TYPE aType, void * pvData, uint32_t flags); 975 void completeCurrentEvent(); 973 976 class VBoxVHWACommandElement * detachCmdList(class VBoxVHWACommandElement * pFirst2Free, VBoxVHWACommandElement * pLast2Free); 974 977 … … 1185 1188 ULONG aW, ULONG aH); 1186 1189 1190 /** 1191 * to be called on RequestResize framebuffer call 1192 * @return true if the request was processed & should not be forwarded to the framebuffer 1193 * false - otherwise */ 1194 bool onRequestResize (ULONG aScreenId, ULONG aPixelFormat, 1195 BYTE *aVRAM, ULONG aBitsPerPixel, ULONG aBytesPerLine, 1196 ULONG aWidth, ULONG aHeight, 1197 BOOL *aFinished) 1198 { 1199 mCmdPipe.completeCurrentEvent(); 1200 return false; 1201 } 1202 1187 1203 VBOXFBOVERLAY_RESUT onPaintEvent (const QPaintEvent *pe, QRect *pRect); 1188 1204 void onResizeEvent (const class VBoxResizeEvent *re); … … 1308 1324 } 1309 1325 1326 STDMETHOD(RequestResize) (ULONG aScreenId, ULONG aPixelFormat, 1327 BYTE *aVRAM, ULONG aBitsPerPixel, ULONG aBytesPerLine, 1328 ULONG aWidth, ULONG aHeight, 1329 BOOL *aFinished) 1330 { 1331 if(mOverlay.onRequestResize (aScreenId, aPixelFormat, 1332 aVRAM, aBitsPerPixel, aBytesPerLine, 1333 aWidth, aHeight, 1334 aFinished)) 1335 { 1336 return S_OK; 1337 } 1338 return T::RequestResize (aScreenId, aPixelFormat, 1339 aVRAM, aBitsPerPixel, aBytesPerLine, 1340 aWidth, aHeight, 1341 aFinished); 1342 } 1343 1310 1344 STDMETHOD(NotifyUpdate) (ULONG aX, ULONG aY, 1311 1345 ULONG aW, ULONG aH) -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
r22834 r22836 3403 3403 // Assert(mbVGASurfCreated); 3404 3404 mDisplay.getVGA()->getComplexList()->add(surf); 3405 #ifdef DEBUG_misha 3405 3406 Assert(pCmd->SurfInfo.surfCaps & VBOXVHWA_SCAPS_VISIBLE); 3407 #endif 3406 3408 // if(pCmd->SurfInfo.surfCaps & VBOXVHWA_SCAPS_VISIBLE) 3407 3409 { … … 3747 3749 vboxCheckUpdateAddress (pDstSurf, pCmd->u.in.offDstSurface); 3748 3750 VBOXQGLLOG(("pDstSurf (0x%x)\n",pDstSurf)); 3751 #ifdef DEBUG_misha 3749 3752 Assert(pDstSurf == mDisplay.getVGA()); 3750 3753 Assert(mDisplay.getVGA() == mDisplay.getPrimary()); 3754 #endif 3751 3755 Assert(pDstSurf->getComplexList() == mDisplay.getVGA()->getComplexList()); 3752 3756 … … 5100 5104 int VBoxQGLOverlay::onVHWACommand(struct _VBOXVHWACMD * pCmd) 5101 5105 { 5102 // Assert(0); 5103 // VBOXVHWACMD * pCmd = (VBOXVHWACMD*)pCommand; 5106 uint32_t flags = 0; 5107 switch(pCmd->enmCmd) 5108 { 5109 case VBOXVHWACMD_TYPE_SURF_FLIP: 5110 case VBOXVHWACMD_TYPE_SURF_OVERLAY_UPDATE: 5111 case VBOXVHWACMD_TYPE_SURF_OVERLAY_SETPOSITION: 5112 flags |= VBOXVHWACMDPIPEC_COMPLETEEVENT; 5113 break; 5114 default: 5115 break; 5116 }// Assert(0); 5104 5117 /* indicate that we process and complete the command asynchronously */ 5105 5118 pCmd->Flags |= VBOXVHWACMD_FLAG_HG_ASYNCH; 5106 /* post the command to the GUI thread for processing */ 5107 // QApplication::postEvent (mView, 5108 // new VBoxVHWACommandProcessEvent (pCmd)); 5109 mCmdPipe.postCmd(VBOXVHWA_PIPECMD_VHWA, pCmd); 5119 5120 mCmdPipe.postCmd(VBOXVHWA_PIPECMD_VHWA, pCmd, flags); 5110 5121 return VINF_SUCCESS; 5111 // return E_NOTIMPL; 5122 5112 5123 } 5113 5124 … … 5138 5149 #if 1 5139 5150 QRect r(aX, aY, aW, aH); 5140 mCmdPipe.postCmd(VBOXVHWA_PIPECMD_PAINT, &r );5151 mCmdPipe.postCmd(VBOXVHWA_PIPECMD_PAINT, &r, 0); 5141 5152 return true; 5142 5153 #else … … 5645 5656 } 5646 5657 5647 void VBoxVHWACommandElementProcessor::postCmd(VBOXVHWA_PIPECMD_TYPE aType, void * pvData) 5658 void VBoxVHWACommandElementProcessor::completeCurrentEvent() 5659 { 5660 RTCritSectEnter(&mCritSect); 5661 mbNewEvent = true; 5662 RTCritSectLeave(&mCritSect); 5663 } 5664 5665 void VBoxVHWACommandElementProcessor::postCmd(VBOXVHWA_PIPECMD_TYPE aType, void * pvData, uint32_t flags) 5648 5666 { 5649 5667 /* 1. lock*/ … … 5661 5679 } 5662 5680 pCmd->setData(aType, pvData); 5681 5682 if((flags & VBOXVHWACMDPIPEC_NEWEVENT) != 0) 5683 { 5684 mbNewEvent = true; 5685 } 5686 5663 5687 /* 2. if can add to current*/ 5664 5688 if(!mbNewEvent) … … 5670 5694 mpLastEvent->pipe().put(pCmd); 5671 5695 /* 3.b unlock and return */ 5696 if((flags & VBOXVHWACMDPIPEC_COMPLETEEVENT) != 0) 5697 { 5698 mbNewEvent = true; 5699 } 5672 5700 RTCritSectLeave(&mCritSect); 5673 5701 return; … … 5680 5708 /* 5. create & initialize new Event */ 5681 5709 VBoxVHWACommandProcessEvent *pCurrentEvent = new VBoxVHWACommandProcessEvent(pCmd); 5710 pCurrentEvent->mpNext = NULL; 5711 5682 5712 /* 6. lock */ 5683 5713 RTCritSectEnter(&mCritSect); … … 5688 5718 mpFirstEvent = pCurrentEvent; 5689 5719 mpLastEvent = pCurrentEvent; 5690 pCurrentEvent->mpNext = NULL;5691 5720 } 5692 5721 else … … 5696 5725 } 5697 5726 /* 8. reset blocking events counter */ 5698 mbNewEvent = false;5727 mbNewEvent = ((flags & VBOXVHWACMDPIPEC_COMPLETEEVENT) != 0); 5699 5728 /* 9. unlock */ 5700 5729 RTCritSectLeave(&mCritSect); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBQGL.cpp
r22826 r22836 79 79 #else 80 80 QRect r(aX, aY, aW, aH); 81 mCmdPipe.postCmd(VBOXVHWA_PIPECMD_PAINT, &r );81 mCmdPipe.postCmd(VBOXVHWA_PIPECMD_PAINT, &r, 0); 82 82 #endif 83 83 return S_OK; … … 162 162 // QApplication::postEvent (mView, 163 163 // new VBoxVHWACommandProcessEvent (pCmd)); 164 mCmdPipe.postCmd(VBOXVHWA_PIPECMD_VHWA, pCmd );164 mCmdPipe.postCmd(VBOXVHWA_PIPECMD_VHWA, pCmd, 0); 165 165 return S_OK; 166 166 }
Note:
See TracChangeset
for help on using the changeset viewer.