⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 203514 in webkit


Ignore:
Timestamp:
Jul 21, 2016, 11:20:20 AM (10 years ago)
Author:
Alan Bujtas
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r203511 r203514  
     12016-07-21  Zalan Bujtas  <zalan@apple.com>
     2
     3        Do not keep invalid IOSurface in ImageBufferData.
     4        https://bugs.webkit.org/show_bug.cgi?id=160005
     5        <rdar://problem/27208636>
     6
     7        Reviewed by Simon Fraser.
     8
     9        When we fail to initialize the IOSurface for the accelerated context, we switch over to
     10        the non-accelerated code path. Since ImageBufferData::surface is used to indicate whether
     11        the graphics context is in accelerated mode, we need to reset it when the initialization fails.
     12
     13        Unable to create a test case.
     14
     15        * platform/graphics/cg/ImageBufferCG.cpp:
     16        (WebCore::ImageBuffer::ImageBuffer):
     17
    1182016-07-21  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp

    r203424 r203514  
    159159        if (cgContext)
    160160            CGContextClearRect(cgContext.get(), FloatRect(FloatPoint(), userBounds));
     161        else
     162            m_data.surface = nullptr;
    161163#endif
    162164
Note: See TracChangeset for help on using the changeset viewer.