Changeset 147178 in webkit


Ignore:
Timestamp:
Mar 28, 2013 4:08:43 PM (11 years ago)
Author:
wangxianzhu@chromium.org
Message:

[Chromium] Don't create SolidColorLayer for full transparent background
https://bugs.webkit.org/show_bug.cgi?id=113524

Reviewed by James Robinson.

Source/WebCore:

Test: GraphicsLayerChromiumTest.setContentsToSolidColor

  • platform/graphics/chromium/GraphicsLayerChromium.cpp:

(WebCore::GraphicsLayerChromium::setContentsToSolidColor):

Source/WebKit/chromium:

  • tests/GraphicsLayerChromiumTest.cpp:

(GraphicsLayerChromiumTest::setContentsToSolidColor):

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r147172 r147178  
     12013-03-28  Xianzhu Wang  <wangxianzhu@chromium.org>
     2
     3        [Chromium] Don't create SolidColorLayer for full transparent background
     4        https://bugs.webkit.org/show_bug.cgi?id=113524
     5
     6        Reviewed by James Robinson.
     7
     8        Test: GraphicsLayerChromiumTest.setContentsToSolidColor
     9
     10        * platform/graphics/chromium/GraphicsLayerChromium.cpp:
     11        (WebCore::GraphicsLayerChromium::setContentsToSolidColor):
     12
    1132013-03-28  Arnaud Renevier  <a.renevier@sisa.samsung.com>
    214
  • trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp

    r146826 r147178  
    525525    m_contentsSolidColor = color;
    526526
    527     if (color.isValid()) {
     527    if (color.isValid() && color.alpha()) {
    528528        if (!m_contentsSolidColorLayer) {
    529529            m_contentsSolidColorLayer = adoptPtr(Platform::current()->compositorSupport()->createSolidColorLayer());
  • trunk/Source/WebKit/chromium/ChangeLog

    r147161 r147178  
     12013-03-28  Xianzhu Wang  <wangxianzhu@chromium.org>
     2
     3        [Chromium] Don't create SolidColorLayer for full transparent background
     4        https://bugs.webkit.org/show_bug.cgi?id=113524
     5
     6        Reviewed by James Robinson.
     7
     8        * tests/GraphicsLayerChromiumTest.cpp:
     9        (GraphicsLayerChromiumTest::setContentsToSolidColor):
     10
    1112013-03-28  Kent Tamura  <tkent@chromium.org>
    212
  • trunk/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp

    r146826 r147178  
    148148}
    149149
     150TEST_F(GraphicsLayerChromiumTest, setContentsToSolidColor)
     151{
     152    m_graphicsLayer->setContentsToSolidColor(Color::transparent);
     153    EXPECT_FALSE(m_graphicsLayer->contentsLayer());
     154
     155    m_graphicsLayer->setContentsToSolidColor(Color::white);
     156    EXPECT_TRUE(m_graphicsLayer->contentsLayer());
     157
     158    m_graphicsLayer->setContentsToSolidColor(Color());
     159    EXPECT_FALSE(m_graphicsLayer->contentsLayer());
     160}
     161
    150162} // namespace
Note: See TracChangeset for help on using the changeset viewer.