Changeset 70641 in webkit


Ignore:
Timestamp:
Oct 27, 2010 6:15:49 AM (13 years ago)
Author:
Adam Roben
Message:

Only decompress pixel buffers when needed (and fix a crash in the process)

Fixes <http://webkit.org/b/48417> Crash when running
compositing/video/video-background-color.html on Windows

Reviewed by Anders Carlsson.

  • platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:

(WebCore::MediaPlayerPrivateQuickTimeVisualContext::paint): Only
decompress the pixel buffer when it has an incompatible format. This
also has the benefit of only decompressing the buffer when a
QTDecompressionSession has been created! (I assume this was just a typo
from when this code was added in r70252.)

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r70634 r70641  
     12010-10-27  Adam Roben  <aroben@apple.com>
     2
     3        Only decompress pixel buffers when needed (and fix a crash in the
     4        process)
     5
     6        Fixes <http://webkit.org/b/48417> Crash when running
     7        compositing/video/video-background-color.html on Windows
     8
     9        Reviewed by Anders Carlsson.
     10
     11        * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
     12        (WebCore::MediaPlayerPrivateQuickTimeVisualContext::paint): Only
     13        decompress the pixel buffer when it has an incompatible format. This
     14        also has the benefit of only decompressing the buffer when a
     15        QTDecompressionSession has been created! (I assume this was just a typo
     16        from when this code was added in r70252.)
     17
    1182010-10-27  Mario Sanchez Prada  <msanchez@igalia.com>
    219
  • trunk/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp

    r70252 r70641  
    744744                if (!m_decompressionSession || !m_decompressionSession->canDecompress(buffer))
    745745                    m_decompressionSession = QTDecompressionSession::create(buffer.pixelFormatType(), buffer.width(), buffer.height());
     746                buffer = m_decompressionSession->decompress(buffer);
    746747            }
    747 
    748             buffer = m_decompressionSession->decompress(buffer);
    749748        }
    750749#endif
Note: See TracChangeset for help on using the changeset viewer.