• kylechar's avatar
    Skip fallback images for external textures · 906b53e5
    kylechar authored
    If SkiaRenderer is missing a texture during draw it tries to allocate an
    equivalent fallback texture of the correct size and attributes. This
    doesn't work for externally allocated textures.
    
    Currently ImageContextImpl::CreateFallbackImage() creates a
    GrBackendTexture of type k2D instead of kExternal. This triggers a later
    SkASSERT in GrTextureProxy::onValidateSurface(). When SkAsSSERTs are
    disabled it still doesn't draw anything. Just skip drawing the fallback
    texture by proving a null SkPromiseImageTexture instead.
    
    Bug: 1029522
    Change-Id: I6f370694116e8a47e8885492f1365783c046db65
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1946627Reviewed-by: default avatarJonathan Backer <backer@chromium.org>
    Commit-Queue: kylechar <kylechar@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#720604}
    906b53e5
image_context_impl.cc 8.74 KB