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

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

Issue 2225033003: Separate backgroundObscurationStatus and hasBoxDecorationBackground (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 4 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 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 HTMLVideoElement* videoElement = toHTMLVideoElement(layoutObject()->node ()); 1221 HTMLVideoElement* videoElement = toHTMLVideoElement(layoutObject()->node ());
1222 if (videoElement->isFullscreen() && videoElement->usesOverlayFullscreenV ideo()) 1222 if (videoElement->isFullscreen() && videoElement->usesOverlayFullscreenV ideo())
1223 inOverlayFullscreenVideo = true; 1223 inOverlayFullscreenVideo = true;
1224 } 1224 }
1225 bool hasPaintedContent = inOverlayFullscreenVideo ? false : containsPaintedC ontent(); 1225 bool hasPaintedContent = inOverlayFullscreenVideo ? false : containsPaintedC ontent();
1226 m_graphicsLayer->setDrawsContent(hasPaintedContent); 1226 m_graphicsLayer->setDrawsContent(hasPaintedContent);
1227 1227
1228 if (m_scrollingLayer) { 1228 if (m_scrollingLayer) {
1229 // m_scrollingLayer never has backing store. 1229 // m_scrollingLayer never has backing store.
1230 // m_scrollingContentsLayer only needs backing store if the scrolled con tents need to paint. 1230 // m_scrollingContentsLayer only needs backing store if the scrolled con tents need to paint.
1231 m_scrollingContentsAreEmpty = !m_owningLayer.hasVisibleContent() || !(la youtObject()->hasBackground() || layoutObject()->hasBackdropFilter() || paintsCh ildren()); 1231 m_scrollingContentsAreEmpty = !m_owningLayer.hasVisibleContent() || !(la youtObject()->styleRef().hasBackground() || layoutObject()->hasBackdropFilter() || paintsChildren());
1232 m_scrollingContentsLayer->setDrawsContent(!m_scrollingContentsAreEmpty); 1232 m_scrollingContentsLayer->setDrawsContent(!m_scrollingContentsAreEmpty);
1233 } 1233 }
1234 1234
1235 if (hasPaintedContent && isAcceleratedCanvas(layoutObject())) { 1235 if (hasPaintedContent && isAcceleratedCanvas(layoutObject())) {
1236 CanvasRenderingContext* context = toHTMLCanvasElement(layoutObject()->no de())->renderingContext(); 1236 CanvasRenderingContext* context = toHTMLCanvasElement(layoutObject()->no de())->renderingContext();
1237 // Content layer may be null if context is lost. 1237 // Content layer may be null if context is lost.
1238 if (WebLayer* contentLayer = context->platformLayer()) { 1238 if (WebLayer* contentLayer = context->platformLayer()) {
1239 Color bgColor(Color::transparent); 1239 Color bgColor(Color::transparent);
1240 if (contentLayerSupportsDirectBackgroundComposition(layoutObject())) { 1240 if (contentLayerSupportsDirectBackgroundComposition(layoutObject())) {
1241 bgColor = layoutObjectBackgroundColor(); 1241 bgColor = layoutObjectBackgroundColor();
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after
2672 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2672 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2673 name = "Scrolling Contents Layer"; 2673 name = "Scrolling Contents Layer";
2674 } else { 2674 } else {
2675 ASSERT_NOT_REACHED(); 2675 ASSERT_NOT_REACHED();
2676 } 2676 }
2677 2677
2678 return name; 2678 return name;
2679 } 2679 }
2680 2680
2681 } // namespace blink 2681 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698