Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 765dffe2f0dfdd86abab15b6c4c2da4419d4d943
      
https://github.com/WebKit/WebKit/commit/765dffe2f0dfdd86abab15b6c4c2da4419d4d943
  Author: Kimmo Kinnunen <kkinnu...@apple.com>
  Date:   2023-10-11 (Wed, 11 Oct 2023)

  Changed paths:
    M Source/WebCore/platform/cocoa/LocalCurrentGraphicsContext.h
    M Source/WebCore/platform/graphics/GraphicsContextStateSaver.h
    M Source/WebCore/platform/graphics/mac/ColorMac.mm
    M Source/WebCore/platform/ios/LocalCurrentGraphicsContextIOS.mm
    M Source/WebCore/platform/mac/LocalCurrentGraphicsContextMac.mm

  Log Message:
  -----------
  ColorMac creates GraphicsContextCG only to set CGContext as the 
NSGraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=262377
rdar://116241128

Reviewed by Tim Horton.

Add LocalCurrentCGContext, similar to LocalCurrentGraphicsContext
except it uses direct CGContext instead of GraphicsContextCG.

Avoids constructing GraphicsContextCG trivially in this use-case.

Reland after revert: underlying bugs fixed in commits before.

* Source/WebCore/platform/cocoa/LocalCurrentGraphicsContext.h:
(WebCore::LocalCurrentCGContext::LocalCurrentCGContext):
(WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
(WebCore::LocalCurrentGraphicsContext::cgContext):
* Source/WebCore/platform/graphics/GraphicsContextStateSaver.h:
* Source/WebCore/platform/graphics/mac/ColorMac.mm:
(WebCore::makeSimpleColorFromNSColor):
* Source/WebCore/platform/ios/LocalCurrentGraphicsContextIOS.mm:
(WebCore::LocalCurrentContextSaver::LocalCurrentContextSaver):
(WebCore::LocalCurrentContextSaver::~LocalCurrentContextSaver):
(WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext): Deleted.
(WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext): Deleted.
* Source/WebCore/platform/mac/LocalCurrentGraphicsContextMac.mm:
(WebCore::LocalCurrentContextSaver::LocalCurrentContextSaver):
(WebCore::LocalCurrentContextSaver::~LocalCurrentContextSaver):
(WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext): Deleted.
(WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext): Deleted.

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to