Changeset 19817 in vbox for trunk/src/VBox/Frontends/VBoxBFE
- Timestamp:
- May 19, 2009 12:16:28 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxBFE
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp
r19300 r19817 93 93 mcbVbvaPartial = 0; 94 94 95 RTSemEventMultiCreate(&mUpdateSem);96 97 // reset the event sems98 RTSemEventMultiReset(mUpdateSem);99 100 95 // by default, we have an internal Framebuffer which is 101 96 // NULL, i.e. a black hole for no display output 97 mFramebuffer = NULL; 98 mFramebufferOpened = false; 99 100 mu32ResizeStatus = ResizeStatus_Void; 101 } 102 103 VMDisplay::~VMDisplay() 104 { 102 105 mFramebuffer = 0; 103 mInternalFramebuffer = true;104 mFramebufferOpened = false;105 106 mu32ResizeStatus = ResizeStatus_Void;107 }108 109 VMDisplay::~VMDisplay()110 {111 mFramebuffer = 0;112 RTSemEventMultiDestroy(mUpdateSem);113 106 } 114 107 … … 201 194 202 195 // this is only valid for external framebuffers 203 if ( mInternalFramebuffer)196 if (!mFramebuffer) 204 197 return E_FAIL; 205 198 … … 259 252 } 260 253 261 // special processing for the internal Framebuffer 262 if (mInternalFramebuffer) 263 { 264 mFramebuffer->Unlock(); 265 } 266 else 267 { 268 // callback into the Framebuffer to notify it 269 BOOL finished; 270 271 RTSemEventMultiReset(mUpdateSem); 272 273 mFramebuffer->NotifyUpdate(x, y, w, h, &finished); 274 mFramebuffer->Unlock(); 275 276 if (!finished) 277 { 278 // the Framebuffer needs more time to process 279 // the event so we have to halt the VM until it's done 280 RTSemEventMultiWait(mUpdateSem, RT_INDEFINITE_WAIT); 281 } 282 } 254 mFramebuffer->NotifyUpdate(x, y, w, h); 255 mFramebuffer->Unlock(); 283 256 } 284 257 … … 336 309 * @param Framebuffer external Framebuffer object 337 310 */ 338 STDMETHODIMP VMDisplay:: RegisterExternalFramebuffer(Framebuffer *Framebuffer)311 STDMETHODIMP VMDisplay::SetFramebuffer(unsigned iScreenID, Framebuffer *Framebuffer) 339 312 { 340 313 if (!Framebuffer) … … 343 316 // free current Framebuffer (if there is any) 344 317 mFramebuffer = 0; 345 mInternalFramebuffer = false;346 318 mFramebuffer = Framebuffer; 347 319 updateDisplayData(); -
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.h
r8155 r19817 55 55 uint32_t getBitsPerPixel(); 56 56 57 STDMETHODIMP RegisterExternalFramebuffer(Framebuffer *Framebuffer);57 STDMETHODIMP SetFramebuffer(unsigned iScreenID, Framebuffer *Framebuffer); 58 58 STDMETHODIMP InvalidateAndUpdate(); 59 59 STDMETHODIMP ResizeCompleted(); … … 84 84 85 85 Framebuffer *mFramebuffer; 86 bool m InternalFramebuffer, mFramebufferOpened;86 bool mFramebufferOpened; 87 87 88 88 ULONG mSupportedAccelOps; 89 RTSEMEVENTMULTI mUpdateSem;90 89 91 90 struct _VBVAMEMORY *mpVbvaMemory; -
trunk/src/VBox/Frontends/VBoxBFE/Framebuffer.h
r19798 r19817 44 44 virtual HRESULT getBitsPerPixel(ULONG *bitsPerPixel) = 0; 45 45 virtual HRESULT getLineSize(ULONG *lineSize) = 0; 46 virtual HRESULT NotifyUpdate(ULONG x, ULONG y, 47 ULONG w, ULONG h, BOOL *finished) = 0; 46 virtual HRESULT NotifyUpdate(ULONG x, ULONG y, ULONG w, ULONG h) = 0; 48 47 virtual HRESULT RequestResize(ULONG w, ULONG h, BOOL *finished) = 0; 49 48 -
trunk/src/VBox/Frontends/VBoxBFE/SDLFramebuffer.cpp
r19798 r19817 228 228 */ 229 229 HRESULT SDLFramebuffer::NotifyUpdate(ULONG x, ULONG y, 230 ULONG w, ULONG h , BOOL *finished)230 ULONG w, ULONG h) 231 231 { 232 232 LogFlow(("SDLFramebuffer::NotifyUpdate: x = %d, y = %d, w = %d, h = %d\n", … … 258 258 #endif /* !VBOXBFE_WITH_X11 */ 259 259 260 /*261 * The Display thread can continue as we will lock the framebuffer262 * from the SDL thread when we get to actually doing the update.263 */264 if (finished)265 *finished = TRUE;266 260 return S_OK; 267 261 } -
trunk/src/VBox/Frontends/VBoxBFE/SDLFramebuffer.h
r19798 r19817 50 50 virtual HRESULT getBitsPerPixel(ULONG *bitsPerPixel); 51 51 virtual HRESULT getLineSize(ULONG *lineSize); 52 virtual HRESULT NotifyUpdate(ULONG x, ULONG y, 53 ULONG w, ULONG h, BOOL *finished); 52 virtual HRESULT NotifyUpdate(ULONG x, ULONG y, ULONG w, ULONG h); 54 53 virtual HRESULT RequestResize(ULONG w, ULONG h, BOOL *finished); 55 54 virtual HRESULT GetVisibleRegion(BYTE *aRectangles, ULONG aCount, ULONG *aCountCopied); -
trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp
r19300 r19817 803 803 if (!gConsole->initialized()) 804 804 goto leave; 805 gDisplay-> RegisterExternalFramebuffer(gFramebuffer);805 gDisplay->SetFramebuffer(0, gFramebuffer); 806 806 807 807 /* start with something in the titlebar */
Note:
See TracChangeset
for help on using the changeset viewer.