Title: [252977] trunk/Source/WebCore
- Revision
- 252977
- Author
- timothy_hor...@apple.com
- Date
- 2019-12-01 19:32:26 -0800 (Sun, 01 Dec 2019)
Log Message
Disable LocalCurrentGraphicsContext when doing DisplayList recording
https://bugs.webkit.org/show_bug.cgi?id=204721
Reviewed by Simon Fraser.
* platform/mac/LocalCurrentGraphicsContext.mm:
(WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
Since we don't have a platform context, we can't set the global
graphics context. This means that anything depending on this downstream
will break and need to be implemented a different way in
the DisplayList case.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (252976 => 252977)
--- trunk/Source/WebCore/ChangeLog 2019-12-02 03:19:14 UTC (rev 252976)
+++ trunk/Source/WebCore/ChangeLog 2019-12-02 03:32:26 UTC (rev 252977)
@@ -1,3 +1,17 @@
+2019-12-01 Tim Horton <timothy_hor...@apple.com>
+
+ Disable LocalCurrentGraphicsContext when doing DisplayList recording
+ https://bugs.webkit.org/show_bug.cgi?id=204721
+
+ Reviewed by Simon Fraser.
+
+ * platform/mac/LocalCurrentGraphicsContext.mm:
+ (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
+ Since we don't have a platform context, we can't set the global
+ graphics context. This means that anything depending on this downstream
+ will break and need to be implemented a different way in
+ the DisplayList case.
+
2019-12-01 Zalan Bujtas <za...@apple.com>
[LFC][IFC] Trim trailing letter spacing.
Modified: trunk/Source/WebCore/platform/mac/LocalCurrentGraphicsContext.mm (252976 => 252977)
--- trunk/Source/WebCore/platform/mac/LocalCurrentGraphicsContext.mm 2019-12-02 03:19:14 UTC (rev 252976)
+++ trunk/Source/WebCore/platform/mac/LocalCurrentGraphicsContext.mm 2019-12-02 03:32:26 UTC (rev 252977)
@@ -32,16 +32,20 @@
{
graphicsContext.save();
- ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+ if (!graphicsContext.hasPlatformContext()) {
+ WTFLogAlways("LocalCurrentGraphicsContext is not setting the global context because the provided GraphicsContext does not have a platform context (likely display list recording)");
+ m_savedNSGraphicsContext = nil;
+ return;
+ }
+
CGContextRef cgContext = this->cgContext();
- if (cgContext == [[NSGraphicsContext currentContext] graphicsPort]) {
- m_savedNSGraphicsContext = 0;
+ if (cgContext == [[NSGraphicsContext currentContext] CGContext]) {
+ m_savedNSGraphicsContext = nil;
return;
}
m_savedNSGraphicsContext = [[NSGraphicsContext currentContext] retain];
- NSGraphicsContext* newContext = [NSGraphicsContext graphicsContextWithGraphicsPort:cgContext flipped:YES];
- ALLOW_DEPRECATED_DECLARATIONS_END
+ NSGraphicsContext* newContext = [NSGraphicsContext graphicsContextWithCGContext:cgContext flipped:YES];
[NSGraphicsContext setCurrentContext:newContext];
m_didSetGraphicsContext = true;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes