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

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

Issue 279643002: Remove dead RenderLayerCompositor::setCompositingParent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/compositing/RenderLayerCompositor.h ('k') | no next file » | 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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 if (!child->hasCompositedLayerMapping() || parent->renderer()->documentBeing Destroyed()) 657 if (!child->hasCompositedLayerMapping() || parent->renderer()->documentBeing Destroyed())
658 return; 658 return;
659 659
660 { 660 {
661 // FIXME: This is called from within RenderLayer::removeChild, which is called from RenderObject::RemoveChild. 661 // FIXME: This is called from within RenderLayer::removeChild, which is called from RenderObject::RemoveChild.
662 // There's no guarantee that compositor state is up to date. 662 // There's no guarantee that compositor state is up to date.
663 DisableCompositingQueryAsserts disabler; 663 DisableCompositingQueryAsserts disabler;
664 repaintInCompositedAncestor(child, child->compositedLayerMapping()->comp ositedBounds()); 664 repaintInCompositedAncestor(child, child->compositedLayerMapping()->comp ositedBounds());
665 } 665 }
666 666
667 setCompositingParent(child, 0);
668 setCompositingLayersNeedRebuild(); 667 setCompositingLayersNeedRebuild();
669 } 668 }
670 669
671 void RenderLayerCompositor::setCompositingParent(RenderLayer* childLayer, Render Layer* parentLayer)
672 {
673 ASSERT(!parentLayer || childLayer->ancestorCompositingLayer() == parentLayer );
674 ASSERT(childLayer->hasCompositedLayerMapping());
675
676 // It's possible to be called with a parent that isn't yet composited when w e're doing
677 // partial updates as required by painting or hit testing. Just bail in that case;
678 // we'll do a full layer update soon.
679 if (!parentLayer || !parentLayer->hasCompositedLayerMapping())
680 return;
681
682 if (parentLayer) {
683 GraphicsLayer* hostingLayer = parentLayer->compositedLayerMapping()->par entForSublayers();
684 GraphicsLayer* hostedLayer = childLayer->compositedLayerMapping()->child ForSuperlayers();
abarth-chromium 2014/05/09 03:02:36 Do parentForSublayers and childForSuperlayers stil
685
686 hostingLayer->addChild(hostedLayer);
687 } else {
688 childLayer->compositedLayerMapping()->childForSuperlayers()->removeFromP arent();
689 }
690 }
691
692 void RenderLayerCompositor::frameViewDidChangeLocation(const IntPoint& contentsO ffset) 670 void RenderLayerCompositor::frameViewDidChangeLocation(const IntPoint& contentsO ffset)
693 { 671 {
694 if (m_overflowControlsHostLayer) 672 if (m_overflowControlsHostLayer)
695 m_overflowControlsHostLayer->setPosition(contentsOffset); 673 m_overflowControlsHostLayer->setPosition(contentsOffset);
696 } 674 }
697 675
698 void RenderLayerCompositor::frameViewDidChangeSize() 676 void RenderLayerCompositor::frameViewDidChangeSize()
699 { 677 {
700 if (m_containerLayer) { 678 if (m_containerLayer) {
701 FrameView* frameView = m_renderView.frameView(); 679 FrameView* frameView = m_renderView.frameView();
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 } else if (graphicsLayer == m_scrollLayer.get()) { 1426 } else if (graphicsLayer == m_scrollLayer.get()) {
1449 name = "LocalFrame Scrolling Layer"; 1427 name = "LocalFrame Scrolling Layer";
1450 } else { 1428 } else {
1451 ASSERT_NOT_REACHED(); 1429 ASSERT_NOT_REACHED();
1452 } 1430 }
1453 1431
1454 return name; 1432 return name;
1455 } 1433 }
1456 1434
1457 } // namespace WebCore 1435 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698