Changeset 261322 in webkit


Ignore:
Timestamp:
May 7, 2020 11:42:21 AM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Fix Google Maps rendering corruption in simulator with ANGLE
https://bugs.webkit.org/show_bug.cgi?id=211398

glReadPixels call needs to respect the row stride of the IOSurface.

Patch by James Darpinian <James Darpinian> on 2020-05-07
Reviewed by Alex Christensen.

  • src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.h:
  • src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm:

(rx::IOSurfaceSurfaceEAGL::IOSurfaceSurfaceEAGL):
(rx::IOSurfaceSurfaceEAGL::releaseTexImage):

Location:
trunk/Source/ThirdParty/ANGLE
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/ThirdParty/ANGLE/ChangeLog

    r261262 r261322  
     12020-05-07  James Darpinian  <jdarpinian@chromium.org>
     2
     3        Fix Google Maps rendering corruption in simulator with ANGLE
     4        https://bugs.webkit.org/show_bug.cgi?id=211398
     5
     6        glReadPixels call needs to respect the row stride of the IOSurface.
     7
     8        Reviewed by Alex Christensen.
     9
     10        * src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.h:
     11        * src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm:
     12        (rx::IOSurfaceSurfaceEAGL::IOSurfaceSurfaceEAGL):
     13        (rx::IOSurfaceSurfaceEAGL::releaseTexImage):
     14
    1152020-05-07  Dean Jackson  <dino@apple.com>
    216
  • trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.h

    r261185 r261322  
    7676    int mPlane;
    7777    int mFormatIndex;
     78    int mRowStrideInPixels;
    7879
    7980    bool mAlphaInitialized;
  • trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm

    r261185 r261322  
    8484      mHeight(0),
    8585      mPlane(0),
     86      mRowStrideInPixels(0),
    8687      mFormatIndex(-1),
    8788      mAlphaInitialized(false)
     
    9596    mHeight = static_cast<int>(attribs.get(EGL_HEIGHT));
    9697    mPlane  = static_cast<int>(attribs.get(EGL_IOSURFACE_PLANE_ANGLE));
     98    // Hopefully the number of bytes per row is always an integer number of pixels.
     99    // We use glReadPixels to fill the IOSurface in the simulator and it can only
     100    // support strides that are an integer number of pixels.
     101    ASSERT(IOSurfaceGetBytesPerRowOfPlane(mIOSurface, mPlane) % IOSurfaceGetBytesPerElementOfPlane(mIOSurface, mPlane) == 0);
     102    mRowStrideInPixels = static_cast<int>(IOSurfaceGetBytesPerRowOfPlane(mIOSurface, mPlane) / IOSurfaceGetBytesPerElementOfPlane(mIOSurface, mPlane));
    97103
    98104    EGLAttrib internalFormat = attribs.get(EGL_TEXTURE_INTERNAL_FORMAT_ANGLE);
     
    228234                                        mBoundTextureID, 0);
    229235        gl::PixelPackState state;
     236        state.rowLength = mRowStrideInPixels;
    230237        state.alignment = 1;
    231238        stateManager->setPixelPackState(state);
Note: See TracChangeset for help on using the changeset viewer.