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

Side by Side Diff: Source/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 358913003: Get rid of one-off code in ScrollingCoordinator to handle graphics layer offsets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix. Created 6 years, 5 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/RenderLayer.cpp ('k') | Source/core/testing/Internals.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) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 IntSize newOffsetFromRenderer = -IntSize(offsetFromSquashLayerOrigin.wid th().round(), offsetFromSquashLayerOrigin.height().round()); 597 IntSize newOffsetFromRenderer = -IntSize(offsetFromSquashLayerOrigin.wid th().round(), offsetFromSquashLayerOrigin.height().round());
598 LayoutSize subpixelAccumulation = offsetFromSquashLayerOrigin + newOffse tFromRenderer; 598 LayoutSize subpixelAccumulation = offsetFromSquashLayerOrigin + newOffse tFromRenderer;
599 if (layers[i].offsetFromRendererSet && layers[i].offsetFromRenderer != n ewOffsetFromRenderer) { 599 if (layers[i].offsetFromRendererSet && layers[i].offsetFromRenderer != n ewOffsetFromRenderer) {
600 layers[i].renderLayer->repainter().repaintIncludingNonCompositingDes cendants(); 600 layers[i].renderLayer->repainter().repaintIncludingNonCompositingDes cendants();
601 layersNeedingPaintInvalidation.append(layers[i].renderLayer); 601 layersNeedingPaintInvalidation.append(layers[i].renderLayer);
602 } 602 }
603 layers[i].offsetFromRenderer = newOffsetFromRenderer; 603 layers[i].offsetFromRenderer = newOffsetFromRenderer;
604 layers[i].offsetFromRendererSet = true; 604 layers[i].offsetFromRendererSet = true;
605 605
606 layers[i].renderLayer->setSubpixelAccumulation(subpixelAccumulation); 606 layers[i].renderLayer->setSubpixelAccumulation(subpixelAccumulation);
607
608 // FIXME: find a better design to avoid this redundant value - most like ly it will make
609 // sense to move the paint task info into RenderLayer's m_compositingPro perties.
610 layers[i].renderLayer->setOffsetFromSquashingLayerOrigin(layers[i].offse tFromRenderer);
611 } 607 }
612 608
613 squashingLayer->setPosition(squashLayerBounds.location()); 609 squashingLayer->setPosition(squashLayerBounds.location());
614 squashingLayer->setSize(squashLayerBounds.size()); 610 squashingLayer->setSize(squashLayerBounds.size());
615 611
616 *offsetFromTransformedAncestor = referenceOffsetFromTransformedAncestor; 612 *offsetFromTransformedAncestor = referenceOffsetFromTransformedAncestor;
617 offsetFromTransformedAncestor->move(squashLayerOriginInOwningLayerSpace); 613 offsetFromTransformedAncestor->move(squashLayerOriginInOwningLayerSpace);
618 614
619 for (size_t i = 0; i < layers.size(); ++i) 615 for (size_t i = 0; i < layers.size(); ++i)
620 layers[i].localClipRectForSquashedLayer = localClipRectForSquashedLayer( referenceLayer, layers[i], layers); 616 layers[i].localClipRectForSquashedLayer = localClipRectForSquashedLayer( referenceLayer, layers[i], layers);
(...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after
2248 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2244 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2249 name = "Scrolling Block Selection Layer"; 2245 name = "Scrolling Block Selection Layer";
2250 } else { 2246 } else {
2251 ASSERT_NOT_REACHED(); 2247 ASSERT_NOT_REACHED();
2252 } 2248 }
2253 2249
2254 return name; 2250 return name;
2255 } 2251 }
2256 2252
2257 } // namespace WebCore 2253 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698