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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 1637143002: Layers that have a backdrop-filter should paints contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 } 1194 }
1195 1195
1196 void CompositedLayerMapping::updateDrawsContent() 1196 void CompositedLayerMapping::updateDrawsContent()
1197 { 1197 {
1198 bool hasPaintedContent = containsPaintedContent(); 1198 bool hasPaintedContent = containsPaintedContent();
1199 m_graphicsLayer->setDrawsContent(hasPaintedContent); 1199 m_graphicsLayer->setDrawsContent(hasPaintedContent);
1200 1200
1201 if (m_scrollingLayer) { 1201 if (m_scrollingLayer) {
1202 // m_scrollingLayer never has backing store. 1202 // m_scrollingLayer never has backing store.
1203 // m_scrollingContentsLayer only needs backing store if the scrolled con tents need to paint. 1203 // m_scrollingContentsLayer only needs backing store if the scrolled con tents need to paint.
1204 m_scrollingContentsAreEmpty = !m_owningLayer.hasVisibleContent() || !(la youtObject()->hasBackground() || paintsChildren()); 1204 m_scrollingContentsAreEmpty = !m_owningLayer.hasVisibleContent() || !(la youtObject()->hasBackground() || layoutObject()->hasBackdropFilter() || paintsCh ildren());
1205 m_scrollingContentsLayer->setDrawsContent(!m_scrollingContentsAreEmpty); 1205 m_scrollingContentsLayer->setDrawsContent(!m_scrollingContentsAreEmpty);
1206 } 1206 }
1207 1207
1208 if (hasPaintedContent && isAcceleratedCanvas(layoutObject())) { 1208 if (hasPaintedContent && isAcceleratedCanvas(layoutObject())) {
1209 CanvasRenderingContext* context = toHTMLCanvasElement(layoutObject()->no de())->renderingContext(); 1209 CanvasRenderingContext* context = toHTMLCanvasElement(layoutObject()->no de())->renderingContext();
1210 // Content layer may be null if context is lost. 1210 // Content layer may be null if context is lost.
1211 if (WebLayer* contentLayer = context->platformLayer()) { 1211 if (WebLayer* contentLayer = context->platformLayer()) {
1212 Color bgColor(Color::transparent); 1212 Color bgColor(Color::transparent);
1213 if (contentLayerSupportsDirectBackgroundComposition(layoutObject())) { 1213 if (contentLayerSupportsDirectBackgroundComposition(layoutObject())) {
1214 bgColor = layoutObjectBackgroundColor(); 1214 bgColor = layoutObjectBackgroundColor();
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after
2540 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2540 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2541 name = "Scrolling Contents Layer"; 2541 name = "Scrolling Contents Layer";
2542 } else { 2542 } else {
2543 ASSERT_NOT_REACHED(); 2543 ASSERT_NOT_REACHED();
2544 } 2544 }
2545 2545
2546 return name; 2546 return name;
2547 } 2547 }
2548 2548
2549 } // namespace blink 2549 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698