OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 | 517 |
518 void GraphicsLayerChromium::setContentsToSolidColor(const Color& color) | 518 void GraphicsLayerChromium::setContentsToSolidColor(const Color& color) |
519 { | 519 { |
520 if (color == m_contentsSolidColor) | 520 if (color == m_contentsSolidColor) |
521 return; | 521 return; |
522 | 522 |
523 bool childrenChanged = false; | 523 bool childrenChanged = false; |
524 | 524 |
525 m_contentsSolidColor = color; | 525 m_contentsSolidColor = color; |
526 | 526 |
527 if (color.isValid()) { | 527 if (color.isValid() && color.alpha()) { |
528 if (!m_contentsSolidColorLayer) { | 528 if (!m_contentsSolidColorLayer) { |
529 m_contentsSolidColorLayer = adoptPtr(Platform::current()->compositor
Support()->createSolidColorLayer()); | 529 m_contentsSolidColorLayer = adoptPtr(Platform::current()->compositor
Support()->createSolidColorLayer()); |
530 registerContentsLayer(m_contentsSolidColorLayer->layer()); | 530 registerContentsLayer(m_contentsSolidColorLayer->layer()); |
531 | 531 |
532 setupContentsLayer(m_contentsSolidColorLayer->layer()); | 532 setupContentsLayer(m_contentsSolidColorLayer->layer()); |
533 childrenChanged = true; | 533 childrenChanged = true; |
534 } | 534 } |
535 | 535 |
536 m_contentsSolidColorLayer->setBackgroundColor(color.rgb()); | 536 m_contentsSolidColorLayer->setBackgroundColor(color.rgb()); |
537 updateContentsRect(); | 537 updateContentsRect(); |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 info.addMember(m_contentsLayer, "contentsLayer"); | 909 info.addMember(m_contentsLayer, "contentsLayer"); |
910 info.addMember(m_linkHighlight, "linkHighlight"); | 910 info.addMember(m_linkHighlight, "linkHighlight"); |
911 info.addMember(m_opaqueRectTrackingContentLayerDelegate, "opaqueRectTracking
ContentLayerDelegate"); | 911 info.addMember(m_opaqueRectTrackingContentLayerDelegate, "opaqueRectTracking
ContentLayerDelegate"); |
912 info.addMember(m_animationIdMap, "animationIdMap"); | 912 info.addMember(m_animationIdMap, "animationIdMap"); |
913 info.addMember(m_scrollableArea, "scrollableArea"); | 913 info.addMember(m_scrollableArea, "scrollableArea"); |
914 } | 914 } |
915 | 915 |
916 } // namespace WebCore | 916 } // namespace WebCore |
917 | 917 |
918 #endif // USE(ACCELERATED_COMPOSITING) | 918 #endif // USE(ACCELERATED_COMPOSITING) |
OLD | NEW |