VirtualBox

Ignore:
Timestamp:
Dec 3, 2009 12:23:36 AM (15 years ago)
Author:
vboxsync
Message:

crOpenGL: better fix for blank screen after compiz loading

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_snapshot.c

    r25154 r25155  
    11251125        diff_api.PixelStorei(GL_PACK_LSB_FIRST, 0);
    11261126
     1127        diff_api.ReadBuffer(GL_FRONT);
    11271128        diff_api.ReadPixels(0, 0, pVP->viewportW, pVP->viewportH, GL_RGBA, GL_UNSIGNED_BYTE, pData);
    11281129
     1130        diff_api.ReadBuffer(pContext->framebufferobject.readFB ?
     1131                            pContext->framebufferobject.readFB->readbuffer : pContext->buffer.readBuffer);
    11291132        diff_api.PixelStorei(GL_PACK_SKIP_ROWS, packing.skipRows);
    11301133        diff_api.PixelStorei(GL_PACK_SKIP_PIXELS, packing.skipPixels);
     
    17861789    {
    17871790        CRViewportState *pVP = &pContext->viewport;
    1788         CRPixelPackState unpack = pContext->client.unpack;
    17891791        GLint cbData = crPixelSize(GL_RGBA, GL_UNSIGNED_BYTE) * pVP->viewportH * pVP->viewportW;
    17901792        void *pData = crAlloc(cbData);
     
    17921794        if (!pData)
    17931795        {
     1796            pContext->pImage = NULL;
    17941797            return VERR_NO_MEMORY;
    17951798        }
     
    17981801        AssertRCReturn(rc, rc);
    17991802
    1800         diff_api.PixelStorei(GL_UNPACK_SKIP_ROWS, 0);
    1801         diff_api.PixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
    1802         diff_api.PixelStorei(GL_UNPACK_ALIGNMENT, 1);
    1803         diff_api.PixelStorei(GL_UNPACK_ROW_LENGTH, 0);
    1804         diff_api.PixelStorei(GL_UNPACK_IMAGE_HEIGHT, 0);
    1805         diff_api.PixelStorei(GL_UNPACK_SKIP_IMAGES, 0);
    1806         diff_api.PixelStorei(GL_UNPACK_SWAP_BYTES, 0);
    1807         diff_api.PixelStorei(GL_UNPACK_LSB_FIRST, 0);
    1808 
    1809         diff_api.WindowPos2iARB(0, 0);
    1810         diff_api.DrawPixels(pVP->viewportW, pVP->viewportH, GL_RGBA, GL_UNSIGNED_BYTE, pData);
    1811 
    1812         diff_api.PixelStorei(GL_UNPACK_SKIP_ROWS, unpack.skipRows);
    1813         diff_api.PixelStorei(GL_UNPACK_SKIP_PIXELS, unpack.skipPixels);
    1814         diff_api.PixelStorei(GL_UNPACK_ALIGNMENT, unpack.alignment);
    1815         diff_api.PixelStorei(GL_UNPACK_ROW_LENGTH, unpack.rowLength);
    1816         diff_api.PixelStorei(GL_UNPACK_IMAGE_HEIGHT, unpack.imageHeight);
    1817         diff_api.PixelStorei(GL_UNPACK_SKIP_IMAGES, unpack.skipImages);
    1818         diff_api.PixelStorei(GL_UNPACK_SWAP_BYTES, unpack.swapBytes);
    1819         diff_api.PixelStorei(GL_UNPACK_LSB_FIRST, unpack.psLSBFirst);
    1820 
    1821         crFree(pData);
     1803        pContext->pImage = pData;
    18221804    }
    18231805
Note: See TracChangeset for help on using the changeset viewer.

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