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

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

Issue 886923003: Inline two methods with only one caller. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « sky/engine/core/rendering/RenderLayer.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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 beginTransparencyLayers(transparencyLayerContext, localPaintingInfo.root Layer, transparencyPaintDirtyRect, localPaintingInfo.subPixelAccumulation); 1012 beginTransparencyLayers(transparencyLayerContext, localPaintingInfo.root Layer, transparencyPaintDirtyRect, localPaintingInfo.subPixelAccumulation);
1013 1013
1014 // Optimize clipping for the single fragment case. 1014 // Optimize clipping for the single fragment case.
1015 bool shouldClip = localPaintingInfo.clipToDirtyRect && !foregroundRectIsEmpt y; 1015 bool shouldClip = localPaintingInfo.clipToDirtyRect && !foregroundRectIsEmpt y;
1016 if (shouldClip) 1016 if (shouldClip)
1017 clipToRect(localPaintingInfo, context, layerForegroundRect); 1017 clipToRect(localPaintingInfo, context, layerForegroundRect);
1018 1018
1019 // TODO(ojan): We probably should early return at the beginning of this func tion 1019 // TODO(ojan): We probably should early return at the beginning of this func tion
1020 // if the rect is empty. 1020 // if the rect is empty.
1021 if (!foregroundRectIsEmpty) { 1021 if (!foregroundRectIsEmpty) {
1022 paintForegroundWithPhase(PaintPhaseForeground, 1022 PaintInfo paintInfo(context, pixelSnappedIntRect(layerForegroundRect.rec t()), PaintPhaseForeground, localPaintingInfo.rootLayer->renderer());
1023 context, localPaintingInfo, 1023 renderer()->paint(paintInfo, layerLocation);
1024 layerLocation, layerForegroundRect);
1025 } 1024 }
1026 1025
1027 if (shouldClip) 1026 if (shouldClip)
1028 restoreClip(context, localPaintingInfo.paintDirtyRect, layerForegroundRe ct); 1027 restoreClip(context, localPaintingInfo.paintDirtyRect, layerForegroundRe ct);
1029 } 1028 }
1030 1029
1031 void RenderLayer::paintForegroundWithPhase(PaintPhase phase, GraphicsContext* co ntext,
1032 const LayerPaintingInfo& localPaintingInfo, LayoutPoint& layerLocation, Clip Rect& layerForegroundRect)
1033 {
1034 PaintInfo paintInfo(context, pixelSnappedIntRect(layerForegroundRect.rect()) , phase, localPaintingInfo.rootLayer->renderer());
1035 renderer()->paint(paintInfo, layerLocation);
1036 }
1037
1038 void RenderLayer::paintMask(GraphicsContext* context, const LayerPaintingInfo& l ocalPaintingInfo, 1030 void RenderLayer::paintMask(GraphicsContext* context, const LayerPaintingInfo& l ocalPaintingInfo,
1039 LayoutPoint& layerLocation, ClipRect& layerBackgroundRect) 1031 LayoutPoint& layerLocation, ClipRect& layerBackgroundRect)
1040 { 1032 {
1041 if (localPaintingInfo.clipToDirtyRect) 1033 if (localPaintingInfo.clipToDirtyRect)
1042 clipToRect(localPaintingInfo, context, layerBackgroundRect, DoNotInclude SelfForBorderRadius); // Mask painting will handle clipping to self. 1034 clipToRect(localPaintingInfo, context, layerBackgroundRect, DoNotInclude SelfForBorderRadius); // Mask painting will handle clipping to self.
1043 1035
1044 // Paint the mask. 1036 // Paint the mask.
1045 // FIXME: Eventually we will collect the region from the fragment itself ins tead of just from the paint info. 1037 // FIXME: Eventually we will collect the region from the fragment itself ins tead of just from the paint info.
1046 PaintInfo paintInfo(context, pixelSnappedIntRect(layerBackgroundRect.rect()) , PaintPhaseMask, localPaintingInfo.rootLayer->renderer()); 1038 PaintInfo paintInfo(context, pixelSnappedIntRect(layerBackgroundRect.rect()) , PaintPhaseMask, localPaintingInfo.rootLayer->renderer());
1047 renderer()->paint(paintInfo, layerLocation); 1039 renderer()->paint(paintInfo, layerLocation);
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 } 1690 }
1699 } 1691 }
1700 1692
1701 void showLayerTree(const blink::RenderObject* renderer) 1693 void showLayerTree(const blink::RenderObject* renderer)
1702 { 1694 {
1703 if (!renderer) 1695 if (!renderer)
1704 return; 1696 return;
1705 showLayerTree(renderer->enclosingLayer()); 1697 showLayerTree(renderer->enclosingLayer());
1706 } 1698 }
1707 #endif 1699 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698