Bug 88703

Summary: [Qt][Texmap] All layers with backingStore are opaque when using TextureMapperGL.
Product: WebKit Reporter: Dongseong Hwang <dongseong.hwang>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: noam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch v.1 none

Description Dongseong Hwang 2012-06-09 00:27:32 PDT
The bug originated from StillImage that is not override
Image::currentFrameHasAlpha(), so it always returns false.
StillImage is used by ImageBuffer, and if Texmap draws contents on ImageBuffer,
TextureMapperBackingStore thinks contents does not have alpha.
Comment 1 Dongseong Hwang 2012-06-09 00:30:08 PDT
Created attachment 146690 [details]
patch v.1
Comment 2 Dongseong Hwang 2012-06-09 00:32:16 PDT
Following code causes this bug.

void TextureMapperLayer::updateBackingStore(TextureMapper* textureMapper, GraphicsLayerTextureMapper* layer)
{
    ...
    // Paint the entire dirty rect into an image buffer. This ensures we only paint once.
    OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(dirtyRect.size());
    ...
    RefPtr<Image> image = imageBuffer->copyImage(DontCopyBackingStore);
    TextureMapperTiledBackingStore* backingStore = static_cast<TextureMapperTiledBackingStore*>(m_backingStore.get());
    backingStore->updateContents(textureMapper, image.get(), m_size, dirtyRect);
    ...
}

void TextureMapperTiledBackingStore::updateContents(TextureMapper* textureMapper, Image* image, const FloatSize& totalSize, const IntRect& dirtyRect)
{
    createOrDestroyTilesIfNeeded(totalSize, textureMapper->maxTextureSize(), image->currentFrameHasAlpha());
    for (size_t i = 0; i < m_tiles.size(); ++i)
        m_tiles[i].updateContents(textureMapper, image, dirtyRect);
}
Comment 3 WebKit Review Bot 2012-06-09 10:12:15 PDT
Comment on attachment 146690 [details]
patch v.1

Clearing flags on attachment: 146690

Committed r119908: <http://trac.webkit.org/changeset/119908>
Comment 4 WebKit Review Bot 2012-06-09 10:12:19 PDT
All reviewed patches have been landed.  Closing bug.