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

Unified Diff: Source/core/rendering/CompositedLayerMapping.h

Issue 20723003: Fix pixel snapping issues when layers become composited (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adding another failing test expectation Created 7 years, 1 month 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: Source/core/rendering/CompositedLayerMapping.h
diff --git a/Source/core/rendering/CompositedLayerMapping.h b/Source/core/rendering/CompositedLayerMapping.h
index 2a4cac9fe88416c1eb6fe6332bc8984be2b9b48b..187eb934abdad57bcb0151801362d193508e94c0 100644
--- a/Source/core/rendering/CompositedLayerMapping.h
+++ b/Source/core/rendering/CompositedLayerMapping.h
@@ -50,7 +50,7 @@ enum CompositingLayerType {
struct GraphicsLayerPaintInfo {
RenderLayer* renderLayer;
- IntRect compositedBounds;
+ LayoutRect compositedBounds;
IntSize offsetFromRenderer;
@@ -144,8 +144,8 @@ public:
void animationPaused(double timeOffset, const String& name);
void animationFinished(const String& name);
- IntRect compositedBounds() const;
- void setCompositedBounds(const IntRect&);
+ LayoutRect compositedBounds() const;
+ void setCompositedBounds(const LayoutRect&);
void updateCompositedBounds();
void updateAfterWidgetResize();
@@ -168,7 +168,7 @@ public:
virtual void verifyNotPainting();
#endif
- IntRect contentsBox() const;
+ LayoutRect contentsBox() const;
IntRect backgroundBox() const;
// For informative purposes only.
@@ -188,6 +188,7 @@ public:
virtual String debugName(const GraphicsLayer*) OVERRIDE;
+ LayoutSize subpixelAccumulation() const { return m_subpixelAccumulation; }
private:
void createPrimaryGraphicsLayer();
void destroyGraphicsLayers();
@@ -213,11 +214,13 @@ private:
void updateDrawsContent(bool isSimpleContainer);
void registerScrollingLayers();
+ void adjustBoundsForSubPixelAccumulation(const RenderLayer* compositedAncestor, IntRect& localCompositingBounds, IntRect& relativeCompositingBounds, IntPoint& delta);
+
void setBackgroundLayerPaintsFixedRootBackground(bool);
GraphicsLayerPaintingPhase paintingPhaseForPrimaryLayer() const;
- IntSize contentOffsetInCompostingLayer() const;
+ LayoutSize contentOffsetInCompostingLayer() const;
// Result is transform origin in pixels.
FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const;
// Result is perspective origin in pixels.
@@ -328,7 +331,8 @@ private:
OwnPtr<WebAnimationProvider> m_animationProvider;
- IntRect m_compositedBounds;
+ LayoutRect m_compositedBounds;
+ LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of the compositedBounds compared to absolute coordinates.
bool m_artificiallyInflatedBounds; // bounds had to be made non-zero to make transform-origin work
bool m_boundsConstrainedByClipping;

Powered by Google App Engine
This is Rietveld 408576698