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

Side by Side Diff: Source/core/rendering/RenderLayerCompositor.cpp

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/RenderLayerCompositor.h ('k') | Source/platform/geometry/LayoutSize.h » ('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) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 // FIXME: Need to perform the correct coordinate conversion for repa intRect here, including transforms 673 // FIXME: Need to perform the correct coordinate conversion for repa intRect here, including transforms
674 compositedAncestor->groupedMapping()->squashingLayer()->setNeedsDisp layInRect(repaintRect); 674 compositedAncestor->groupedMapping()->squashingLayer()->setNeedsDisp layInRect(repaintRect);
675 } else { 675 } else {
676 ASSERT_NOT_REACHED(); 676 ASSERT_NOT_REACHED();
677 } 677 }
678 } 678 }
679 } 679 }
680 680
681 // The bounds of the GraphicsLayer created for a compositing layer is the union of the bounds of all the descendant 681 // The bounds of the GraphicsLayer created for a compositing layer is the union of the bounds of all the descendant
682 // RenderLayers that are rendered by the composited RenderLayer. 682 // RenderLayers that are rendered by the composited RenderLayer.
683 IntRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* laye r, const RenderLayer* ancestorLayer) const 683 LayoutRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* l ayer, const RenderLayer* ancestorLayer) const
684 { 684 {
685 if (!canBeComposited(layer)) 685 if (!canBeComposited(layer))
686 return IntRect(); 686 return LayoutRect();
687 687
688 RenderLayer::CalculateLayerBoundsFlags flags = RenderLayer::DefaultCalculate LayerBoundsFlags | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontCons trainForMask; 688 RenderLayer::CalculateLayerBoundsFlags flags = RenderLayer::DefaultCalculate LayerBoundsFlags | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontCons trainForMask;
689 #if HAVE(COMPOSITOR_FILTER_OUTSETS) 689 #if HAVE(COMPOSITOR_FILTER_OUTSETS)
690 // If the compositor computes its own filter outsets, don't include them in the composited bounds. 690 // If the compositor computes its own filter outsets, don't include them in the composited bounds.
691 if (!layer->paintsWithFilters()) 691 if (!layer->paintsWithFilters())
692 flags &= ~RenderLayer::IncludeLayerFilterOutsets; 692 flags &= ~RenderLayer::IncludeLayerFilterOutsets;
693 #endif 693 #endif
694 return layer->calculateLayerBounds(ancestorLayer, 0, flags); 694 return layer->calculateLayerBounds(ancestorLayer, 0, flags);
695 } 695 }
696 696
(...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after
2588 } else if (graphicsLayer == m_scrollLayer.get()) { 2588 } else if (graphicsLayer == m_scrollLayer.get()) {
2589 name = "Frame Scrolling Layer"; 2589 name = "Frame Scrolling Layer";
2590 } else { 2590 } else {
2591 ASSERT_NOT_REACHED(); 2591 ASSERT_NOT_REACHED();
2592 } 2592 }
2593 2593
2594 return name; 2594 return name;
2595 } 2595 }
2596 2596
2597 } // namespace WebCore 2597 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerCompositor.h ('k') | Source/platform/geometry/LayoutSize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698