Title: [203514] trunk/Source/WebCore
Revision
203514
Author
[email protected]
Date
2016-07-21 11:20:20 -0700 (Thu, 21 Jul 2016)

Log Message

Do not keep invalid IOSurface in ImageBufferData.
https://bugs.webkit.org/show_bug.cgi?id=160005
<rdar://problem/27208636>

Reviewed by Simon Fraser.

When we fail to initialize the IOSurface for the accelerated context, we switch over to
the non-accelerated code path. Since ImageBufferData::surface is used to indicate whether
the graphics context is in accelerated mode, we need to reset it when the initialization fails.

Unable to create a test case.

* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (203513 => 203514)


--- trunk/Source/WebCore/ChangeLog	2016-07-21 18:17:09 UTC (rev 203513)
+++ trunk/Source/WebCore/ChangeLog	2016-07-21 18:20:20 UTC (rev 203514)
@@ -1,3 +1,20 @@
+2016-07-21  Zalan Bujtas  <[email protected]>
+
+        Do not keep invalid IOSurface in ImageBufferData.
+        https://bugs.webkit.org/show_bug.cgi?id=160005
+        <rdar://problem/27208636>
+
+        Reviewed by Simon Fraser.
+
+        When we fail to initialize the IOSurface for the accelerated context, we switch over to
+        the non-accelerated code path. Since ImageBufferData::surface is used to indicate whether
+        the graphics context is in accelerated mode, we need to reset it when the initialization fails.
+
+        Unable to create a test case.
+
+        * platform/graphics/cg/ImageBufferCG.cpp:
+        (WebCore::ImageBuffer::ImageBuffer):
+
 2016-07-21  Chris Dumez  <[email protected]>
 
         playsInline IDL attribute has the wrong casing

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp (203513 => 203514)


--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp	2016-07-21 18:17:09 UTC (rev 203513)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp	2016-07-21 18:20:20 UTC (rev 203514)
@@ -158,6 +158,8 @@
         cgContext = m_data.surface->ensurePlatformContext();
         if (cgContext)
             CGContextClearRect(cgContext.get(), FloatRect(FloatPoint(), userBounds));
+        else
+            m_data.surface = nullptr;
 #endif
 
         if (!cgContext)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to