Commit bcbbd0f3 authored by eae@chromium.org's avatar eae@chromium.org

Switch RenderLayer to to new layout types

https://bugs.webkit.org/show_bug.cgi?id=66507

Reviewed by Eric Seidel.

Convert RenderLayer to new layout abstraction.

No new tests as no new functionality.

* rendering/LayoutTypes.h:
(WebCore::flooredLayoutSize):
* rendering/RenderLayer.cpp:
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
* rendering/RenderLayerCompositor.h:


git-svn-id: svn://svn.chromium.org/blink/trunk@93429 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent ed0a7ba2
2011-08-19 Emil A Eklund <eae@chromium.org>
Switch RenderLayer to to new layout types
https://bugs.webkit.org/show_bug.cgi?id=66507
Reviewed by Eric Seidel.
Convert RenderLayer to new layout abstraction.
No new tests as no new functionality.
* rendering/LayoutTypes.h:
(WebCore::flooredLayoutSize):
* rendering/RenderLayer.cpp:
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
* rendering/RenderLayerCompositor.h:
2011-08-19 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions]Content displayed in regions should not be scrollable
......@@ -71,6 +71,11 @@ inline LayoutPoint flooredLayoutPoint(const FloatSize& s)
return flooredIntPoint(s);
}
inline LayoutSize flooredLayoutSize(const FloatPoint& p)
{
return LayoutSize(static_cast<int>(p.x()), static_cast<int>(p.y()));
}
inline LayoutUnit roundedLayoutUnit(float value)
{
return lroundf(value);
......
......@@ -99,7 +99,7 @@ public:
void setContentsNeedDisplay();
// r is in the coordinate space of the layer's render object
void setContentsNeedDisplayInRect(const IntRect& r);
void setContentsNeedDisplayInRect(const LayoutRect&);
// Notification from the renderer that its content changed.
void contentChanged(RenderLayer::ContentChangeType);
......@@ -116,8 +116,8 @@ public:
void suspendAnimations(double time = 0);
void resumeAnimations();
IntRect compositedBounds() const;
void setCompositedBounds(const IntRect&);
LayoutRect compositedBounds() const;
void setCompositedBounds(const LayoutRect&);
void updateCompositedBounds();
void updateAfterWidgetResize();
......@@ -126,7 +126,7 @@ public:
virtual void notifyAnimationStarted(const GraphicsLayer*, double startTime);
virtual void notifySyncRequired(const GraphicsLayer*);
virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& clip);
virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const LayoutRect& clip);
virtual float deviceScaleFactor() const;
virtual float pageScaleFactor() const;
......@@ -135,7 +135,7 @@ public:
virtual bool showDebugBorders() const;
virtual bool showRepaintCounter() const;
IntRect contentsBox() const;
LayoutRect contentsBox() const;
// For informative purposes only.
CompositingLayerType compositingLayerType() const;
......@@ -164,11 +164,11 @@ private:
GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const;
IntSize contentOffsetInCompostingLayer() const;
LayoutSize contentOffsetInCompostingLayer() const;
// Result is transform origin in pixels.
FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const;
FloatPoint3D computeTransformOrigin(const LayoutRect& borderBox) const;
// Result is perspective origin in pixels.
FloatPoint computePerspectiveOrigin(const IntRect& borderBox) const;
FloatPoint computePerspectiveOrigin(const LayoutRect& borderBox) const;
void updateLayerOpacity(const RenderStyle*);
void updateLayerTransform(const RenderStyle*);
......@@ -190,7 +190,7 @@ private:
bool hasNonCompositingDescendants() const;
void paintIntoLayer(RenderLayer* rootLayer, GraphicsContext*, const IntRect& paintDirtyRect, PaintBehavior, GraphicsLayerPaintingPhase, RenderObject* paintingRoot);
void paintIntoLayer(RenderLayer* rootLayer, GraphicsContext*, const LayoutRect& paintDirtyRect, PaintBehavior, GraphicsLayerPaintingPhase, RenderObject* paintingRoot);
static int graphicsLayerToCSSProperty(AnimatedPropertyID);
static AnimatedPropertyID cssToGraphicsLayerProperty(int);
......@@ -211,7 +211,7 @@ private:
OwnPtr<GraphicsLayer> m_layerForVerticalScrollbar;
OwnPtr<GraphicsLayer> m_layerForScrollCorner;
IntRect m_compositedBounds;
LayoutRect m_compositedBounds;
bool m_artificiallyInflatedBounds; // bounds had to be made non-zero to make transform-origin work
};
......
......@@ -119,7 +119,7 @@ public:
bool needsContentsCompositingLayer(const RenderLayer*) const;
// Return the bounding box required for compositing layer and its childern, relative to ancestorLayer.
// If layerBoundingBox is not 0, on return it contains the bounding box of this layer only.
IntRect calculateCompositedBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer);
LayoutRect calculateCompositedBounds(const RenderLayer*, const RenderLayer* ancestorLayer);
// Repaint the appropriate layers when the given RenderLayer starts or stops being composited.
void repaintOnCompositingChange(RenderLayer*);
......@@ -132,7 +132,7 @@ public:
RenderLayer* enclosingNonStackingClippingLayer(const RenderLayer* layer) const;
// Repaint parts of all composited layers that intersect the given absolute rectangle.
void repaintCompositedLayersAbsoluteRect(const IntRect&);
void repaintCompositedLayersAbsoluteRect(const LayoutRect&);
RenderLayer* rootRenderLayer() const;
GraphicsLayer* rootGraphicsLayer() const;
......@@ -175,9 +175,9 @@ public:
static bool parentFrameContentLayers(RenderPart*);
// Update the geometry of the layers used for clipping and scrolling in frames.
void frameViewDidChangeLocation(const IntPoint& contentsOffset);
void frameViewDidChangeLocation(const LayoutPoint& contentsOffset);
void frameViewDidChangeSize();
void frameViewDidScroll(const IntPoint& = IntPoint());
void frameViewDidScroll(const LayoutPoint& = LayoutPoint());
String layerTreeAsText(bool showDebugInfo = false);
......@@ -202,7 +202,7 @@ private:
// GraphicsLayerClient Implementation
virtual void notifyAnimationStarted(const GraphicsLayer*, double) { }
virtual void notifySyncRequired(const GraphicsLayer*) { scheduleLayerFlush(); }
virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&);
virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const LayoutRect&);
// These calls return false always. They are saying that the layers associated with this client
// (the clipLayer and scrollLayer) should never show debugging info.
......@@ -222,12 +222,12 @@ private:
void clearBackingForLayerIncludingDescendants(RenderLayer*);
// Repaint the given rect (which is layer's coords), and regions of child layers that intersect that rect.
void recursiveRepaintLayerRect(RenderLayer* layer, const IntRect& rect);
void recursiveRepaintLayerRect(RenderLayer*, const LayoutRect&);
typedef HashMap<RenderLayer*, IntRect> OverlapMap;
void addToOverlapMap(OverlapMap&, RenderLayer*, IntRect& layerBounds, bool& boundsComputed);
typedef HashMap<RenderLayer*, LayoutRect> OverlapMap;
void addToOverlapMap(OverlapMap&, RenderLayer*, LayoutRect& layerBounds, bool& boundsComputed);
void addToOverlapMapRecursive(OverlapMap&, RenderLayer*);
static bool overlapsCompositedLayers(OverlapMap&, const IntRect& layerBounds);
static bool overlapsCompositedLayers(OverlapMap&, const LayoutRect& layerBounds);
void updateCompositingLayersTimerFired(Timer<RenderLayerCompositor>*);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment