コード例 #1
0
ファイル: ImageDecoderSkia.cpp プロジェクト: 1833183060/wke
void ImageFrame::setStatus(FrameStatus status)
{
    m_status = status;
    if (m_status == FrameComplete) {
        m_bitmap.setDataComplete();  // Tell the bitmap it's done.
#if PLATFORM(CHROMIUM) && OS(DARWIN)
        if (m_colorProfile.isEmpty())
            return;
        RetainPtr<CGColorSpaceRef> cgColorSpace(AdoptCF, createColorSpace(m_colorProfile));
        resolveColorSpace(m_bitmap.bitmap(), cgColorSpace.get());
#endif
    }
}
コード例 #2
0
void ImageFrame::setStatus(FrameStatus status)
{
    m_status = status;
    if (m_status == FrameComplete) {
        m_bitmap.setDataComplete();  // Tell the bitmap it's done.
#if PLATFORM(CHROMIUM) && OS(DARWIN)
        // resolveColorSpace() and callees assume that the alpha channel is
        // premultiplied, so don't apply the color profile if it isn't.
        if (m_colorProfile.isEmpty() || !m_premultiplyAlpha)
            return;
        RetainPtr<CGColorSpaceRef> cgColorSpace(AdoptCF, createColorSpace(m_colorProfile));
        resolveColorSpace(m_bitmap.bitmap(), cgColorSpace.get());
#endif
    }
}