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

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

Issue 899753003: Walk render tree instead of render layers for paint. (Closed) Base URL: https://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 side-by-side diff with in-line comments
Download patch
Index: sky/engine/core/rendering/RenderLayer.h
diff --git a/sky/engine/core/rendering/RenderLayer.h b/sky/engine/core/rendering/RenderLayer.h
index b0f7fb8f274fba39ff204fcbf7fb87c9bdad7b38..5fbbef54a0b6b28e8a095796bfea0baa09f86f15 100644
--- a/sky/engine/core/rendering/RenderLayer.h
+++ b/sky/engine/core/rendering/RenderLayer.h
@@ -134,6 +134,7 @@ public:
bool hasNonEmptyChildRenderers() const;
bool usedTransparency() const { return m_usedTransparency; }
+ void clearUsedTransparency() { m_usedTransparency = false; }
// Gets the nearest enclosing positioned ancestor layer (also includes
// the <html> layer and the root layer).
@@ -152,8 +153,6 @@ public:
// paints the layers that intersect the damage rect from back to
// front. The hitTest method looks for mouse events by walking
// layers that intersect the point from front to back.
- // paint() assumes that the caller will clip to the bounds of damageRect if necessary.
- void paint(GraphicsContext*, const LayoutRect& damageRect);
bool hitTest(const HitTestRequest&, HitTestResult&);
bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&);
@@ -244,6 +243,9 @@ public:
void updateOrRemoveFilterEffectRenderer();
void updateSelfPaintingLayer();
+ void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&, BorderRadiusClippingRule = IncludeSelfForBorderRadius);
+ void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const ClipRect&);
+
private:
// TODO(ojan): Get rid of this. These are basically layer-tree-only paint phases.
enum PaintLayerFlags {
@@ -256,9 +258,6 @@ private:
void setAncestorChainHasSelfPaintingLayerDescendant();
void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
- void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&, BorderRadiusClippingRule = IncludeSelfForBorderRadius);
- void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const ClipRect&);
-
void setNextSibling(RenderLayer* next) { m_next = next; }
void setPreviousSibling(RenderLayer* prev) { m_previous = prev; }
void setFirstChild(RenderLayer* first) { m_first = first; }
@@ -276,20 +275,6 @@ private:
LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRenderBox(renderer())->location() : LayoutPoint(); }
- // paintLayer() assumes that the caller will clip to the bounds of the painting dirty if necessary.
- void paintLayer(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags);
-
- // paintLayerContents() assumes that the caller will clip to the bounds of the painting dirty rect if necessary.
- void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags);
-
- void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint());
-
- void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags);
-
- void paintForeground(GraphicsContext*, GraphicsContext* transparencyLayerContext,
- const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, const LayerPaintingInfo&,
- LayoutPoint& layerLocation, ClipRect& layerForegroundRect);
-
RenderLayer* hitTestLayer(RenderLayer* rootLayer, RenderLayer* containerLayer, const HitTestRequest& request, HitTestResult& result,
const LayoutRect& hitTestRect, const HitTestLocation&, bool appliedTransform,
const HitTestingTransformState* transformState = 0, double* zOffset = 0);

Powered by Google App Engine
This is Rietveld 408576698