⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 278312 in webkit


Ignore:
Timestamp:
Jun 1, 2021, 10:19:04 AM (5 years ago)
Author:
dino@apple.com
Message:

[WebXR] Attach IOSurface to WebXROpaqueFramebuffer
https://bugs.webkit.org/show_bug.cgi?id=225896
<rdar://problem/78128289>

Add a null check to fix a test crash.

  • Modules/webxr/WebXROpaqueFramebuffer.cpp:

(WebCore::WebXROpaqueFramebuffer::startFrame):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r278311 r278312  
     12021-06-01  Dean Jackson  <dino@apple.com>
     2
     3        [WebXR] Attach IOSurface to WebXROpaqueFramebuffer
     4        https://bugs.webkit.org/show_bug.cgi?id=225896
     5        <rdar://problem/78128289>
     6
     7        Add a null check to fix a test crash.
     8
     9        * Modules/webxr/WebXROpaqueFramebuffer.cpp:
     10        (WebCore::WebXROpaqueFramebuffer::startFrame):
     11
    1122021-06-01  Sam Weinig  <weinig@apple.com>
    213
  • trunk/Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp

    r278295 r278312  
    117117
    118118#if USE(IOSURFACE_FOR_XR_LAYER_DATA)
     119    if (!data.surface)
     120        return;
     121
    119122    auto gCGL = static_cast<GraphicsContextGLOpenGL*>(m_context.graphicsContextGL());
    120123    GCGLenum textureTarget = GraphicsContextGLOpenGL::drawingBufferTextureTarget();
    121124
    122125    auto size = data.surface->size();
     126    if (!size.width() || !size.height())
     127        return;
    123128
    124129    if (!m_opaqueTexture)
Note: See TracChangeset for help on using the changeset viewer.