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

Side by Side Diff: sky/engine/core/rendering/RenderLayer.cpp

Issue 766303002: Remove some dead paint flags. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderView.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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 bool shouldPaintOutline = isSelfPaintingLayer && !isPaintingOverlayScrollbar s 1039 bool shouldPaintOutline = isSelfPaintingLayer && !isPaintingOverlayScrollbar s
1040 && ((isPaintingScrollingContent && isPaintingCompositedBackground) 1040 && ((isPaintingScrollingContent && isPaintingCompositedBackground)
1041 || (!isPaintingScrollingContent && isPaintingCompositedForeground)); 1041 || (!isPaintingScrollingContent && isPaintingCompositedForeground));
1042 bool shouldPaintContent = isSelfPaintingLayer && !isPaintingOverlayScrollbar s; 1042 bool shouldPaintContent = isSelfPaintingLayer && !isPaintingOverlayScrollbar s;
1043 1043
1044 float deviceScaleFactor = blink::deviceScaleFactor(renderer()->frame()); 1044 float deviceScaleFactor = blink::deviceScaleFactor(renderer()->frame());
1045 context->setDeviceScaleFactor(deviceScaleFactor); 1045 context->setDeviceScaleFactor(deviceScaleFactor);
1046 1046
1047 GraphicsContext* transparencyLayerContext = context; 1047 GraphicsContext* transparencyLayerContext = context;
1048 1048
1049 if (paintFlags & PaintLayerPaintingRootBackgroundOnly && !renderer()->isRend erView() && !renderer()->isDocumentElement())
1050 return;
1051
1052 // Ensure our lists are up-to-date. 1049 // Ensure our lists are up-to-date.
1053 m_stackingNode->updateLayerListsIfNeeded(); 1050 m_stackingNode->updateLayerListsIfNeeded();
1054 1051
1055 LayoutPoint offsetFromRoot; 1052 LayoutPoint offsetFromRoot;
1056 convertToLayerCoords(paintingInfo.rootLayer, offsetFromRoot); 1053 convertToLayerCoords(paintingInfo.rootLayer, offsetFromRoot);
1057 1054
1058 LayoutRect rootRelativeBounds; 1055 LayoutRect rootRelativeBounds;
1059 bool rootRelativeBoundsComputed = false; 1056 bool rootRelativeBoundsComputed = false;
1060 1057
1061 // Apply clip-path to context. 1058 // Apply clip-path to context.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 ASSERT(!(localPaintingInfo.paintBehavior & PaintBehaviorForceBlackText)); 1151 ASSERT(!(localPaintingInfo.paintBehavior & PaintBehaviorForceBlackText));
1155 1152
1156 bool shouldPaintBackground = isPaintingCompositedBackground && shouldPaintCo ntent; 1153 bool shouldPaintBackground = isPaintingCompositedBackground && shouldPaintCo ntent;
1157 bool shouldPaintNegZOrderList = (isPaintingScrollingContent && isPaintingOve rflowContents) || (!isPaintingScrollingContent && isPaintingCompositedBackground ); 1154 bool shouldPaintNegZOrderList = (isPaintingScrollingContent && isPaintingOve rflowContents) || (!isPaintingScrollingContent && isPaintingCompositedBackground );
1158 bool shouldPaintOwnContents = isPaintingCompositedForeground && shouldPaintC ontent; 1155 bool shouldPaintOwnContents = isPaintingCompositedForeground && shouldPaintC ontent;
1159 bool shouldPaintNormalFlowAndPosZOrderLists = isPaintingCompositedForeground ; 1156 bool shouldPaintNormalFlowAndPosZOrderLists = isPaintingCompositedForeground ;
1160 bool shouldPaintOverlayScrollbars = isPaintingOverlayScrollbars; 1157 bool shouldPaintOverlayScrollbars = isPaintingOverlayScrollbars;
1161 bool shouldPaintMask = (paintFlags & PaintLayerPaintingCompositingMaskPhase) && shouldPaintContent && renderer()->hasMask(); 1158 bool shouldPaintMask = (paintFlags & PaintLayerPaintingCompositingMaskPhase) && shouldPaintContent && renderer()->hasMask();
1162 bool shouldPaintClippingMask = (paintFlags & PaintLayerPaintingChildClipping MaskPhase) && shouldPaintContent; 1159 bool shouldPaintClippingMask = (paintFlags & PaintLayerPaintingChildClipping MaskPhase) && shouldPaintContent;
1163 1160
1161 // FIXME(sky): Get rid of PaintBehavior argument now that it's always Normal .
1164 PaintBehavior paintBehavior = PaintBehaviorNormal; 1162 PaintBehavior paintBehavior = PaintBehaviorNormal;
1165 if (paintFlags & PaintLayerPaintingSkipRootBackground)
1166 paintBehavior |= PaintBehaviorSkipRootBackground;
1167 else if (paintFlags & PaintLayerPaintingRootBackgroundOnly)
1168 paintBehavior |= PaintBehaviorRootBackgroundOnly;
1169 1163
1170 if (shouldPaintBackground) { 1164 if (shouldPaintBackground) {
1171 paintBackgroundForFragments(layerFragments, context, transparencyLayerCo ntext, paintingInfo.paintDirtyRect, haveTransparency, 1165 paintBackgroundForFragments(layerFragments, context, transparencyLayerCo ntext, paintingInfo.paintDirtyRect, haveTransparency,
1172 localPaintingInfo, paintBehavior, paintingRootForRenderer, paintFlag s); 1166 localPaintingInfo, paintBehavior, paintingRootForRenderer, paintFlag s);
1173 } 1167 }
1174 1168
1175 if (shouldPaintNegZOrderList) 1169 if (shouldPaintNegZOrderList)
1176 paintChildren(NegativeZOrderChildren, context, paintingInfo, paintFlags) ; 1170 paintChildren(NegativeZOrderChildren, context, paintingInfo, paintFlags) ;
1177 1171
1178 if (shouldPaintOwnContents) { 1172 if (shouldPaintOwnContents) {
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
2237 } 2231 }
2238 } 2232 }
2239 2233
2240 void showLayerTree(const blink::RenderObject* renderer) 2234 void showLayerTree(const blink::RenderObject* renderer)
2241 { 2235 {
2242 if (!renderer) 2236 if (!renderer)
2243 return; 2237 return;
2244 showLayerTree(renderer->enclosingLayer()); 2238 showLayerTree(renderer->enclosingLayer());
2245 } 2239 }
2246 #endif 2240 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698