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

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

Issue 772333002: Remove PaintLayerAppliedTransform. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT 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/LayerPaintingInfo.h ('k') | no next file » | 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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 if (shouldSuppressPaintingLayer(this)) 960 if (shouldSuppressPaintingLayer(this))
961 return; 961 return;
962 962
963 // If this layer is totally invisible then there is nothing to paint. 963 // If this layer is totally invisible then there is nothing to paint.
964 if (!renderer()->opacity()) 964 if (!renderer()->opacity())
965 return; 965 return;
966 966
967 if (paintsWithTransparency(paintingInfo.paintBehavior)) 967 if (paintsWithTransparency(paintingInfo.paintBehavior))
968 paintFlags |= PaintLayerHaveTransparency; 968 paintFlags |= PaintLayerHaveTransparency;
969 969
970 // PaintLayerAppliedTransform is used in RenderReplica, to avoid applying th e transform twice. 970 if (paintsWithTransform(paintingInfo.paintBehavior)) {
971 if (paintsWithTransform(paintingInfo.paintBehavior) && !(paintFlags & PaintL ayerAppliedTransform)) {
972 TransformationMatrix layerTransform = renderableTransform(paintingInfo.p aintBehavior); 971 TransformationMatrix layerTransform = renderableTransform(paintingInfo.p aintBehavior);
973 // If the transform can't be inverted, then don't paint anything. 972 // If the transform can't be inverted, then don't paint anything.
974 if (!layerTransform.isInvertible()) 973 if (!layerTransform.isInvertible())
975 return; 974 return;
976 975
977 // If we have a transparency layer enclosing us and we are the root of a transform, then we need to establish the transparency 976 // If we have a transparency layer enclosing us and we are the root of a transform, then we need to establish the transparency
978 // layer from the parent now, assuming there is a parent 977 // layer from the parent now, assuming there is a parent
979 if (paintFlags & PaintLayerHaveTransparency) { 978 if (paintFlags & PaintLayerHaveTransparency) {
980 if (parent()) 979 if (parent())
981 parent()->beginTransparencyLayers(context, paintingInfo.rootLaye r, paintingInfo.paintDirtyRect, paintingInfo.subPixelAccumulation, paintingInfo. paintBehavior); 980 parent()->beginTransparencyLayers(context, paintingInfo.rootLaye r, paintingInfo.paintDirtyRect, paintingInfo.subPixelAccumulation, paintingInfo. paintBehavior);
(...skipping 23 matching lines...) Expand all
1005 return; 1004 return;
1006 } 1005 }
1007 1006
1008 paintLayerContentsAndReflection(context, paintingInfo, paintFlags); 1007 paintLayerContentsAndReflection(context, paintingInfo, paintFlags);
1009 } 1008 }
1010 1009
1011 void RenderLayer::paintLayerContentsAndReflection(GraphicsContext* context, cons t LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags) 1010 void RenderLayer::paintLayerContentsAndReflection(GraphicsContext* context, cons t LayerPaintingInfo& paintingInfo, PaintLayerFlags paintFlags)
1012 { 1011 {
1013 ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant()); 1012 ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant());
1014 1013
1015 PaintLayerFlags localPaintFlags = paintFlags & ~(PaintLayerAppliedTransform) ; 1014 PaintLayerFlags localPaintFlags = paintFlags | PaintLayerPaintingCompositing AllPhases;
1016
1017 localPaintFlags |= PaintLayerPaintingCompositingAllPhases;
1018 paintLayerContents(context, paintingInfo, localPaintFlags); 1015 paintLayerContents(context, paintingInfo, localPaintFlags);
1019 } 1016 }
1020 1017
1021 void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti ngInfo& paintingInfo, PaintLayerFlags paintFlags) 1018 void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti ngInfo& paintingInfo, PaintLayerFlags paintFlags)
1022 { 1019 {
1023 ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant()); 1020 ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant());
1024 ASSERT(!(paintFlags & PaintLayerAppliedTransform));
1025 1021
1026 bool haveTransparency = paintFlags & PaintLayerHaveTransparency; 1022 bool haveTransparency = paintFlags & PaintLayerHaveTransparency;
1027 bool isSelfPaintingLayer = this->isSelfPaintingLayer(); 1023 bool isSelfPaintingLayer = this->isSelfPaintingLayer();
1028 bool isPaintingOverlayScrollbars = paintFlags & PaintLayerPaintingOverlayScr ollbars; 1024 bool isPaintingOverlayScrollbars = paintFlags & PaintLayerPaintingOverlayScr ollbars;
1029 bool isPaintingScrollingContent = paintFlags & PaintLayerPaintingCompositing ScrollingPhase; 1025 bool isPaintingScrollingContent = paintFlags & PaintLayerPaintingCompositing ScrollingPhase;
1030 bool isPaintingCompositedForeground = paintFlags & PaintLayerPaintingComposi tingForegroundPhase; 1026 bool isPaintingCompositedForeground = paintFlags & PaintLayerPaintingComposi tingForegroundPhase;
1031 bool isPaintingCompositedBackground = paintFlags & PaintLayerPaintingComposi tingBackgroundPhase; 1027 bool isPaintingCompositedBackground = paintFlags & PaintLayerPaintingComposi tingBackgroundPhase;
1032 bool isPaintingOverflowContents = paintFlags & PaintLayerPaintingOverflowCon tents; 1028 bool isPaintingOverflowContents = paintFlags & PaintLayerPaintingOverflowCon tents;
1033 // Outline always needs to be painted even if we have no visible content. Al so, 1029 // Outline always needs to be painted even if we have no visible content. Al so,
1034 // the outline is painted in the background phase during composited scrollin g. 1030 // the outline is painted in the background phase during composited scrollin g.
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2205 } 2201 }
2206 } 2202 }
2207 2203
2208 void showLayerTree(const blink::RenderObject* renderer) 2204 void showLayerTree(const blink::RenderObject* renderer)
2209 { 2205 {
2210 if (!renderer) 2206 if (!renderer)
2211 return; 2207 return;
2212 showLayerTree(renderer->enclosingLayer()); 2208 showLayerTree(renderer->enclosingLayer());
2213 } 2209 }
2214 #endif 2210 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/LayerPaintingInfo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698