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

Side by Side Diff: Source/core/rendering/RenderLayer.h

Issue 20723003: Fix pixel snapping issues when layers become composited (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bring up to ToT again... Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/FilterEffectRenderer.cpp ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | 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) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 IntRect absoluteBoundingBox() const; 289 IntRect absoluteBoundingBox() const;
290 290
291 // Bounds used for layer overlap testing in RenderLayerCompositor. 291 // Bounds used for layer overlap testing in RenderLayerCompositor.
292 LayoutRect overlapBounds() const { return overlapBoundsIncludeChildren() ? c alculateLayerBounds(this) : localBoundingBox(); } 292 LayoutRect overlapBounds() const { return overlapBoundsIncludeChildren() ? c alculateLayerBounds(this) : localBoundingBox(); }
293 293
294 // If true, this layer's children are included in its bounds for overlap tes ting. 294 // If true, this layer's children are included in its bounds for overlap tes ting.
295 // We can't rely on the children's positions if this layer has a filter that could have moved the children's pixels around. 295 // We can't rely on the children's positions if this layer has a filter that could have moved the children's pixels around.
296 bool overlapBoundsIncludeChildren() const { return hasFilter() && renderer() ->style()->filter().hasFilterThatMovesPixels(); } 296 bool overlapBoundsIncludeChildren() const { return hasFilter() && renderer() ->style()->filter().hasFilterThatMovesPixels(); }
297 297
298 // Can pass offsetFromRoot if known. 298 // Can pass offsetFromRoot if known.
299 IntRect calculateLayerBounds(const RenderLayer* ancestorLayer, const LayoutP oint* offsetFromRoot = 0, CalculateLayerBoundsFlags = DefaultCalculateLayerBound sFlags) const; 299 LayoutRect calculateLayerBounds(const RenderLayer* ancestorLayer, const Layo utPoint* offsetFromRoot = 0, CalculateLayerBoundsFlags = DefaultCalculateLayerBo undsFlags) const;
300 300
301 // WARNING: This method returns the offset for the parent as this is what up dateLayerPositions expects. 301 // WARNING: This method returns the offset for the parent as this is what up dateLayerPositions expects.
302 LayoutPoint computeOffsetFromRoot(bool& hasLayerOffset) const; 302 LayoutPoint computeOffsetFromRoot(bool& hasLayerOffset) const;
303 303
304 LayoutUnit staticInlinePosition() const { return m_staticInlinePosition; } 304 LayoutUnit staticInlinePosition() const { return m_staticInlinePosition; }
305 LayoutUnit staticBlockPosition() const { return m_staticBlockPosition; } 305 LayoutUnit staticBlockPosition() const { return m_staticBlockPosition; }
306 306
307 void setStaticInlinePosition(LayoutUnit position) { m_staticInlinePosition = position; } 307 void setStaticInlinePosition(LayoutUnit position) { m_staticInlinePosition = position; }
308 void setStaticBlockPosition(LayoutUnit position) { m_staticBlockPosition = p osition; } 308 void setStaticBlockPosition(LayoutUnit position) { m_staticBlockPosition = p osition; }
309 309
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 494
495 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn fo&, PaintLayerFlags); 495 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn fo&, PaintLayerFlags);
496 void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo &, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint()); 496 void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo &, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint());
497 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay erFlags); 497 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay erFlags);
498 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa intingInfo&, PaintLayerFlags); 498 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa intingInfo&, PaintLayerFlags);
499 void paintPaginatedChildLayer(RenderLayer* childLayer, GraphicsContext*, con st LayerPaintingInfo&, PaintLayerFlags); 499 void paintPaginatedChildLayer(RenderLayer* childLayer, GraphicsContext*, con st LayerPaintingInfo&, PaintLayerFlags);
500 void paintChildLayerIntoColumns(RenderLayer* childLayer, GraphicsContext*, c onst LayerPaintingInfo&, PaintLayerFlags, const Vector<RenderLayer*>& columnLaye rs, size_t columnIndex); 500 void paintChildLayerIntoColumns(RenderLayer* childLayer, GraphicsContext*, c onst LayerPaintingInfo&, PaintLayerFlags, const Vector<RenderLayer*>& columnLaye rs, size_t columnIndex);
501 501
502 void collectFragments(LayerFragments&, const RenderLayer* rootLayer, RenderR egion*, const LayoutRect& dirtyRect, 502 void collectFragments(LayerFragments&, const RenderLayer* rootLayer, RenderR egion*, const LayoutRect& dirtyRect,
503 ClipRectsType, OverlayScrollbarSizeRelevancy inOverlayScrollbarSizeRelev ancy = IgnoreOverlayScrollbarSize, 503 ClipRectsType, OverlayScrollbarSizeRelevancy inOverlayScrollbarSizeRelev ancy = IgnoreOverlayScrollbarSize,
504 ShouldRespectOverflowClip = RespectOverflowClip, const LayoutPoint* offs etFromRoot = 0, const LayoutRect* layerBoundingBox = 0); 504 ShouldRespectOverflowClip = RespectOverflowClip, const LayoutPoint* offs etFromRoot = 0,
505 const LayoutSize& subPixelAccumulation = LayoutSize(), const LayoutRect* layerBoundingBox = 0);
505 void updatePaintingInfoForFragments(LayerFragments&, const LayerPaintingInfo &, PaintLayerFlags, bool shouldPaintContent, const LayoutPoint* offsetFromRoot); 506 void updatePaintingInfoForFragments(LayerFragments&, const LayerPaintingInfo &, PaintLayerFlags, bool shouldPaintContent, const LayoutPoint* offsetFromRoot);
506 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, Gr aphicsContext* transparencyLayerContext, 507 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, Gr aphicsContext* transparencyLayerContext,
507 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer); 508 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer);
508 void paintForegroundForFragments(const LayerFragments&, GraphicsContext*, Gr aphicsContext* transparencyLayerContext, 509 void paintForegroundForFragments(const LayerFragments&, GraphicsContext*, Gr aphicsContext* transparencyLayerContext,
509 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, 510 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer,
510 bool selectionOnly, bool forceBlackText); 511 bool selectionOnly, bool forceBlackText);
511 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&, GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti ngRootForRenderer); 512 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&, GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti ngRootForRenderer);
512 void paintOutlineForFragments(const LayerFragments&, GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer); 513 void paintOutlineForFragments(const LayerFragments&, GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer);
513 void paintOverflowControlsForFragments(const LayerFragments&, GraphicsContex t*, const LayerPaintingInfo&); 514 void paintOverflowControlsForFragments(const LayerFragments&, GraphicsContex t*, const LayerPaintingInfo&);
514 void paintMaskForFragments(const LayerFragments&, GraphicsContext*, const La yerPaintingInfo&, RenderObject* paintingRootForRenderer); 515 void paintMaskForFragments(const LayerFragments&, GraphicsContext*, const La yerPaintingInfo&, RenderObject* paintingRootForRenderer);
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 746
746 } // namespace WebCore 747 } // namespace WebCore
747 748
748 #ifndef NDEBUG 749 #ifndef NDEBUG
749 // Outside the WebCore namespace for ease of invocation from gdb. 750 // Outside the WebCore namespace for ease of invocation from gdb.
750 void showLayerTree(const WebCore::RenderLayer*); 751 void showLayerTree(const WebCore::RenderLayer*);
751 void showLayerTree(const WebCore::RenderObject*); 752 void showLayerTree(const WebCore::RenderObject*);
752 #endif 753 #endif
753 754
754 #endif // RenderLayer_h 755 #endif // RenderLayer_h
OLDNEW
« no previous file with comments | « Source/core/rendering/FilterEffectRenderer.cpp ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698