Changeset 95406 in webkit


Ignore:
Timestamp:
Sep 19, 2011 2:19:33 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Re-name LayerChromium border functions to reflect that
they are only for debug use.
https://bugs.webkit.org/show_bug.cgi?id=68212

Patch by Shawn Singh <shawnsingh@chromium.org> on 2011-09-19
Reviewed by James Robinson.

Code cleanup towards unit testing.

  • platform/graphics/chromium/GraphicsLayerChromium.cpp:

(WebCore::GraphicsLayerChromium::clearBackgroundColor):
(WebCore::GraphicsLayerChromium::setDebugBackgroundColor):
(WebCore::GraphicsLayerChromium::setDebugBorder):
(WebCore::GraphicsLayerChromium::updateLayerBackgroundColor):
(WebCore::GraphicsLayerChromium::setupContentsLayer):

  • platform/graphics/chromium/LayerChromium.cpp:

(WebCore::LayerChromium::setDebugBorderColor):
(WebCore::LayerChromium::setDebugBorderWidth):

  • platform/graphics/chromium/LayerChromium.h:
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r95404 r95406  
     12011-09-19  Shawn Singh  <shawnsingh@chromium.org>
     2
     3        Re-name LayerChromium border functions to reflect that
     4        they are only for debug use.
     5        https://bugs.webkit.org/show_bug.cgi?id=68212
     6
     7        Reviewed by James Robinson.
     8
     9        Code cleanup towards unit testing.
     10
     11        * platform/graphics/chromium/GraphicsLayerChromium.cpp:
     12        (WebCore::GraphicsLayerChromium::clearBackgroundColor):
     13        (WebCore::GraphicsLayerChromium::setDebugBackgroundColor):
     14        (WebCore::GraphicsLayerChromium::setDebugBorder):
     15        (WebCore::GraphicsLayerChromium::updateLayerBackgroundColor):
     16        (WebCore::GraphicsLayerChromium::setupContentsLayer):
     17        * platform/graphics/chromium/LayerChromium.cpp:
     18        (WebCore::LayerChromium::setDebugBorderColor):
     19        (WebCore::LayerChromium::setDebugBorderWidth):
     20        * platform/graphics/chromium/LayerChromium.h:
     21
    1222011-09-18  Ilya Tikhonovsky  <loislo@chromium.org>
    223
  • trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp

    r95148 r95406  
    6464namespace WebCore {
    6565
    66 static void setLayerBorderColor(LayerChromium& layer, const Color& color)
    67 {
    68     layer.setBorderColor(color);
    69 }
    70 
    71 static void clearBorderColor(LayerChromium& layer)
    72 {
    73     layer.setBorderColor(static_cast<RGBA32>(0));
    74 }
    75 
    76 static void setLayerBackgroundColor(LayerChromium& layer, const Color& color)
    77 {
    78     layer.setBackgroundColor(color);
    79 }
    80 
    81 static void clearLayerBackgroundColor(LayerChromium& layer)
    82 {
    83     layer.setBackgroundColor(static_cast<RGBA32>(0));
    84 }
    85 
    8666PassOwnPtr<GraphicsLayer> GraphicsLayer::create(GraphicsLayerClient* client)
    8767{
     
    272252
    273253    GraphicsLayer::clearBackgroundColor();
    274     clearLayerBackgroundColor(*m_contentsLayer);
     254    m_contentsLayer->setBackgroundColor(static_cast<RGBA32>(0));
    275255}
    276256
     
    450430{
    451431    if (color.isValid())
    452         setLayerBackgroundColor(*m_layer, color);
     432        m_layer->setBackgroundColor(color);
    453433    else
    454         clearLayerBackgroundColor(*m_layer);
     434        m_layer->setBackgroundColor(static_cast<RGBA32>(0));
    455435}
    456436
     
    458438{
    459439    if (color.isValid()) {
    460         setLayerBorderColor(*m_layer, color);
    461         m_layer->setBorderWidth(borderWidth);
     440        m_layer->setDebugBorderColor(color);
     441        m_layer->setDebugBorderWidth(borderWidth);
    462442    } else {
    463         clearBorderColor(*m_layer);
    464         m_layer->setBorderWidth(0);
     443        m_layer->setDebugBorderColor(static_cast<RGBA32>(0));
     444        m_layer->setDebugBorderWidth(0);
    465445    }
    466446}
     
    632612    // We never create the contents layer just for background color yet.
    633613    if (m_backgroundColorSet)
    634         setLayerBackgroundColor(*m_contentsLayer, m_backgroundColor);
     614        m_contentsLayer->setBackgroundColor(m_backgroundColor);
    635615    else
    636         clearLayerBackgroundColor(*m_contentsLayer);
     616        m_contentsLayer->setBackgroundColor(static_cast<RGBA32>(0));
    637617}
    638618
     
    673653
    674654        if (showDebugBorders()) {
    675             setLayerBorderColor(*m_contentsLayer, Color(0, 0, 128, 180));
    676             m_contentsLayer->setBorderWidth(1);
     655            m_contentsLayer->setDebugBorderColor(Color(0, 0, 128, 180));
     656            m_contentsLayer->setDebugBorderWidth(1);
    677657        }
    678658    }
  • trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp

    r95365 r95406  
    322322}
    323323
    324 void LayerChromium::setBorderColor(const Color& color)
     324void LayerChromium::setDebugBorderColor(const Color& color)
    325325{
    326326    m_debugBorderColor = color;
     
    328328}
    329329
    330 void LayerChromium::setBorderWidth(float width)
     330void LayerChromium::setDebugBorderWidth(float width)
    331331{
    332332    m_debugBorderWidth = width;
  • trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h

    r95365 r95406  
    177177    virtual void protectVisibleTileTextures() { }
    178178
    179     // These exists just for debugging (via drawDebugBorder()).
    180     void setBorderColor(const Color&);
    181 
     179    // These exist just for debugging (via drawDebugBorder()).
     180    void setDebugBorderColor(const Color&);
     181    void setDebugBorderWidth(float);
    182182    void drawDebugBorder();
    183 
    184     void setBorderWidth(float);
    185183
    186184    virtual void pushPropertiesTo(CCLayerImpl*);
Note: See TracChangeset for help on using the changeset viewer.