Changeset 51606 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jun 11, 2014 2:54:11 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 94341
- Location:
- trunk/src/VBox/Frontends
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
r51605 r51606 18 18 19 19 #include <VBox/com/com.h> 20 #include <VBox/com/array.h> 20 21 #include <VBox/com/string.h> 21 22 #include <VBox/com/Guid.h> … … 419 420 } 420 421 422 STDMETHODIMP VBoxSDLFB::NotifyUpdateImage(ULONG aX, 423 ULONG aY, 424 ULONG aWidth, 425 ULONG aHeight, 426 ComSafeArrayIn(BYTE, aImage)) 427 { 428 LogFlow(("NotifyUpdateImage: %d,%d %dx%d\n", aX, aY, aWidth, aHeight)); 429 430 com::SafeArray<BYTE> image(ComSafeArrayInArg(aImage)); 431 432 /* Copy to mSurfVRAM. */ 433 SDL_Rect srcRect; 434 SDL_Rect dstRect; 435 srcRect.x = 0; 436 srcRect.y = 0; 437 srcRect.w = (uint16_t)aWidth; 438 srcRect.h = (uint16_t)aHeight; 439 dstRect.x = (int16_t)aX; 440 dstRect.y = (int16_t)aY; 441 dstRect.w = (uint16_t)aWidth; 442 dstRect.h = (uint16_t)aHeight; 443 444 const uint32_t Rmask = 0x00FF0000, Gmask = 0x0000FF00, Bmask = 0x000000FF, Amask = 0; 445 SDL_Surface *surfSrc = SDL_CreateRGBSurfaceFrom(image.raw(), aWidth, aHeight, 32, aWidth * 4, 446 Rmask, Gmask, Bmask, Amask); 447 if (surfSrc) 448 { 449 SDL_BlitSurface(surfSrc, &srcRect, mSurfVRAM, &dstRect); 450 SDL_FreeSurface(surfSrc); 451 } 452 453 return NotifyUpdate(aX, aY, aWidth, aHeight); 454 } 455 421 456 extern ComPtr<IDisplay> gpDisplay; 422 457 … … 434 469 /* Disable screen updates. */ 435 470 mfUpdates = false; 471 472 // gpDisplay->COMSETTER(FramebufferUpdateMode)(FramebufferUpdateMode_NotifyUpdateImage); 436 473 437 474 /* Save the new bitmap. */ -
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h
r51605 r51606 82 82 83 83 STDMETHOD(NotifyUpdate)(ULONG x, ULONG y, ULONG w, ULONG h); 84 STDMETHOD(NotifyUpdateImage)(ULONG x, ULONG y, ULONG w, ULONG h, ComSafeArrayIn(BYTE, aImage)); 84 85 STDMETHOD(NotifyChange)(ULONG aScreenId, 85 86 ULONG aXOrigin, -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r51605 r51606 263 263 } 264 264 265 STDMETHODIMP UIFrameBuffer::NotifyUpdateImage(ULONG aX, 266 ULONG aY, 267 ULONG aWidth, 268 ULONG aHeight, 269 ComSafeArrayIn(BYTE, aImage)) 270 { 271 return E_NOTIMPL; 272 } 273 265 274 STDMETHODIMP UIFrameBuffer::VideoModeSupported(ULONG uWidth, ULONG uHeight, ULONG uBPP, BOOL *pfSupported) 266 275 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
r51605 r51606 127 127 * @note Calls to this and #setMarkAsUnused method are synchronized (from GUI side). */ 128 128 STDMETHOD(NotifyUpdate)(ULONG uX, ULONG uY, ULONG uWidth, ULONG uHeight); 129 STDMETHOD(NotifyUpdateImage)(ULONG x, ULONG y, ULONG w, ULONG h, ComSafeArrayIn(BYTE, aImage)); 129 130 130 131 /** EMT callback: Returns whether the frame-buffer implementation is willing to support a given video-mode.
Note:
See TracChangeset
for help on using the changeset viewer.