Bug 88703 - [Qt][Texmap] All layers with backingStore are opaque when using TextureMapperGL.
Summary: [Qt][Texmap] All layers with backingStore are opaque when using TextureMapperGL.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-09 00:27 PDT by Dongseong Hwang
Modified: 2012-06-09 10:12 PDT (History)
2 users (show)

See Also:


Attachments
patch v.1 (3.10 KB, patch)
2012-06-09 00:30 PDT, Dongseong Hwang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.