Changeset 95406 in webkit
- Timestamp:
- Sep 19, 2011 2:19:33 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r95404 r95406 1 2011-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 1 22 2011-09-18 Ilya Tikhonovsky <loislo@chromium.org> 2 23 -
trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
r95148 r95406 64 64 namespace WebCore { 65 65 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 86 66 PassOwnPtr<GraphicsLayer> GraphicsLayer::create(GraphicsLayerClient* client) 87 67 { … … 272 252 273 253 GraphicsLayer::clearBackgroundColor(); 274 clearLayerBackgroundColor(*m_contentsLayer);254 m_contentsLayer->setBackgroundColor(static_cast<RGBA32>(0)); 275 255 } 276 256 … … 450 430 { 451 431 if (color.isValid()) 452 setLayerBackgroundColor(*m_layer,color);432 m_layer->setBackgroundColor(color); 453 433 else 454 clearLayerBackgroundColor(*m_layer);434 m_layer->setBackgroundColor(static_cast<RGBA32>(0)); 455 435 } 456 436 … … 458 438 { 459 439 if (color.isValid()) { 460 setLayerBorderColor(*m_layer,color);461 m_layer->set BorderWidth(borderWidth);440 m_layer->setDebugBorderColor(color); 441 m_layer->setDebugBorderWidth(borderWidth); 462 442 } else { 463 clearBorderColor(*m_layer);464 m_layer->set BorderWidth(0);443 m_layer->setDebugBorderColor(static_cast<RGBA32>(0)); 444 m_layer->setDebugBorderWidth(0); 465 445 } 466 446 } … … 632 612 // We never create the contents layer just for background color yet. 633 613 if (m_backgroundColorSet) 634 setLayerBackgroundColor(*m_contentsLayer,m_backgroundColor);614 m_contentsLayer->setBackgroundColor(m_backgroundColor); 635 615 else 636 clearLayerBackgroundColor(*m_contentsLayer);616 m_contentsLayer->setBackgroundColor(static_cast<RGBA32>(0)); 637 617 } 638 618 … … 673 653 674 654 if (showDebugBorders()) { 675 setLayerBorderColor(*m_contentsLayer,Color(0, 0, 128, 180));676 m_contentsLayer->set BorderWidth(1);655 m_contentsLayer->setDebugBorderColor(Color(0, 0, 128, 180)); 656 m_contentsLayer->setDebugBorderWidth(1); 677 657 } 678 658 } -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
r95365 r95406 322 322 } 323 323 324 void LayerChromium::set BorderColor(const Color& color)324 void LayerChromium::setDebugBorderColor(const Color& color) 325 325 { 326 326 m_debugBorderColor = color; … … 328 328 } 329 329 330 void LayerChromium::set BorderWidth(float width)330 void LayerChromium::setDebugBorderWidth(float width) 331 331 { 332 332 m_debugBorderWidth = width; -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h
r95365 r95406 177 177 virtual void protectVisibleTileTextures() { } 178 178 179 // These exist sjust for debugging (via drawDebugBorder()).180 void set BorderColor(const Color&);181 179 // These exist just for debugging (via drawDebugBorder()). 180 void setDebugBorderColor(const Color&); 181 void setDebugBorderWidth(float); 182 182 void drawDebugBorder(); 183 184 void setBorderWidth(float);185 183 186 184 virtual void pushPropertiesTo(CCLayerImpl*);
Note: See TracChangeset
for help on using the changeset viewer.