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

Side by Side Diff: Source/core/rendering/CompositedLayerMapping.cpp

Issue 63943006: Re-enable solid background color optimization for composited layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix build bot Created 7 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 m_graphicsLayer->setBackgroundColor(Color()); 1261 m_graphicsLayer->setBackgroundColor(Color());
1262 } else { 1262 } else {
1263 // An unset (invalid) color will remove the solid color. 1263 // An unset (invalid) color will remove the solid color.
1264 m_graphicsLayer->setContentsToSolidColor(Color()); 1264 m_graphicsLayer->setContentsToSolidColor(Color());
1265 m_graphicsLayer->setBackgroundColor(backgroundColor); 1265 m_graphicsLayer->setBackgroundColor(backgroundColor);
1266 } 1266 }
1267 } 1267 }
1268 1268
1269 static bool supportsDirectBoxDecorationsComposition(const RenderObject* renderer ) 1269 static bool supportsDirectBoxDecorationsComposition(const RenderObject* renderer )
1270 { 1270 {
1271 if (!GraphicsLayer::supportsBackgroundColorContent())
1272 return false;
1273
1274 if (renderer->hasClip()) 1271 if (renderer->hasClip())
1275 return false; 1272 return false;
1276 1273
1277 if (hasBoxDecorationsOrBackgroundImage(renderer->style())) 1274 if (hasBoxDecorationsOrBackgroundImage(renderer->style()))
1278 return false; 1275 return false;
1279 1276
1280 // FIXME: we should be able to allow backgroundComposite; However since this is not a common use case it has been deferred for now. 1277 // FIXME: we should be able to allow backgroundComposite; However since this is not a common use case it has been deferred for now.
1281 if (renderer->style()->backgroundComposite() != CompositeSourceOver) 1278 if (renderer->style()->backgroundComposite() != CompositeSourceOver)
1282 return false; 1279 return false;
1283 1280
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
2003 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2000 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2004 name = "Scrolling Contents Layer"; 2001 name = "Scrolling Contents Layer";
2005 } else { 2002 } else {
2006 ASSERT_NOT_REACHED(); 2003 ASSERT_NOT_REACHED();
2007 } 2004 }
2008 2005
2009 return name; 2006 return name;
2010 } 2007 }
2011 2008
2012 } // namespace WebCore 2009 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698