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

Unified Diff: sky/engine/core/rendering/LayerFragment.h

Issue 788383002: Revert of Remove RenderLayer::collectFragments. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderLayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/LayerFragment.h
diff --git a/sky/engine/core/rendering/LayerFragment.h b/sky/engine/core/rendering/LayerFragment.h
index be5abd9dfeae6711c47ecc70a05199a175c0e685..c482e026461902adf9aad05e38dfb3e01ae63744 100644
--- a/sky/engine/core/rendering/LayerFragment.h
+++ b/sky/engine/core/rendering/LayerFragment.h
@@ -38,6 +38,29 @@
{
}
+ void setRects(const LayoutRect& bounds, const ClipRect& background, const ClipRect& foreground, const ClipRect& outline)
+ {
+ layerBounds = bounds;
+ backgroundRect = background;
+ foregroundRect = foreground;
+ outlineRect = outline;
+ }
+
+ void moveBy(const LayoutPoint& offset)
+ {
+ layerBounds.moveBy(offset);
+ backgroundRect.moveBy(offset);
+ foregroundRect.moveBy(offset);
+ outlineRect.moveBy(offset);
+ }
+
+ void intersect(const LayoutRect& rect)
+ {
+ backgroundRect.intersect(rect);
+ foregroundRect.intersect(rect);
+ outlineRect.intersect(rect);
+ }
+
bool shouldPaintContent;
LayoutRect layerBounds;
ClipRect backgroundRect;
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698