Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp

Issue 13430007: Merge 147178 "[Chromium] Don't create SolidColorLayer for full t..." (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1453/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « no previous file | Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698