Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: af33ec387361b90b9972cc1fbd859e59090fbffb
      
https://github.com/WebKit/WebKit/commit/af33ec387361b90b9972cc1fbd859e59090fbffb
  Author: Kimmo Kinnunen <kkinnu...@apple.com>
  Date:   2023-10-04 (Wed, 04 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.

* 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/268842@main


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

Reply via email to