[webkit-changes] [WebKit/WebKit] 40ecc8: ImageBufferIOSurfaceBackend bitmap draws spend tim...

Kimmo Kinnunen noreply at github.com
Mon Mar 6 23:14:59 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 40ecc82d81c30df348048138b0d54c8fc677bb72
      https://github.com/WebKit/WebKit/commit/40ecc82d81c30df348048138b0d54c8fc677bb72
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2023-03-06 (Mon, 06 Mar 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
    M Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp

  Log Message:
  -----------
  ImageBufferIOSurfaceBackend bitmap draws spend time maintaining the color conversion cache
https://bugs.webkit.org/show_bug.cgi?id=253151
rdar://106082568

Reviewed by Simon Fraser.

When drawing small GPUP IOSurface canvases to WP small bitmap layer tiles,
the tiles would have display colorspace. The CG bitmap draw would do color
matching.

The color matching conversion result for the source image would be
stored in a cache inside CG.

This cache is redundant, as we cannot currently hold on to the
bitmap CGImages created from GPUP IOSurfaces. This would mean that the
cache was maintained redundantly, as each image would be a new one
and the cache would not see any hits.

Mark the bitmap images as transient to avoid the cache, rather color
match during blit to the layer bitmap.

Also avoid putting any transient bitmaps into GraphicsContextCG
subimage cache, for consistency.

* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::drawNativeImageInternal):
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
(WebCore::ImageBufferIOSurfaceBackend::copyNativeImageForDrawing):

Canonical link: https://commits.webkit.org/261309@main




More information about the webkit-changes mailing list