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

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

Issue 326253002: Inline RenderLayerCompositor::layerWasAdded (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 return; 550 return;
551 ASSERT(compositedAncestor->compositingState() == PaintsIntoOwnBacking || com positedAncestor->compositingState() == PaintsIntoGroupedBacking); 551 ASSERT(compositedAncestor->compositingState() == PaintsIntoOwnBacking || com positedAncestor->compositingState() == PaintsIntoGroupedBacking);
552 552
553 LayoutPoint offset; 553 LayoutPoint offset;
554 layer->convertToLayerCoords(compositedAncestor, offset); 554 layer->convertToLayerCoords(compositedAncestor, offset);
555 LayoutRect repaintRect = rect; 555 LayoutRect repaintRect = rect;
556 repaintRect.moveBy(offset); 556 repaintRect.moveBy(offset);
557 compositedAncestor->repainter().setBackingNeedsRepaintInRect(repaintRect); 557 compositedAncestor->repainter().setBackingNeedsRepaintInRect(repaintRect);
558 } 558 }
559 559
560 void RenderLayerCompositor::layerWasAdded(RenderLayer* /*parent*/, RenderLayer* /*child*/)
561 {
562 setNeedsCompositingUpdate(CompositingUpdateRebuildTree);
563 }
564
565 void RenderLayerCompositor::layerWillBeRemoved(RenderLayer* parent, RenderLayer* child) 560 void RenderLayerCompositor::layerWillBeRemoved(RenderLayer* parent, RenderLayer* child)
566 { 561 {
567 if (!child->hasCompositedLayerMapping() || parent->renderer()->documentBeing Destroyed()) 562 if (!child->hasCompositedLayerMapping() || parent->renderer()->documentBeing Destroyed())
568 return; 563 return;
569 564
570 { 565 {
571 // FIXME: This is called from within RenderLayer::removeChild, which is called from RenderObject::RemoveChild. 566 // FIXME: This is called from within RenderLayer::removeChild, which is called from RenderObject::RemoveChild.
572 // There's no guarantee that compositor state is up to date. 567 // There's no guarantee that compositor state is up to date.
573 DisableCompositingQueryAsserts disabler; 568 DisableCompositingQueryAsserts disabler;
574 repaintInCompositedAncestor(child, child->compositedLayerMapping()->comp ositedBounds()); 569 repaintInCompositedAncestor(child, child->compositedLayerMapping()->comp ositedBounds());
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 } else if (graphicsLayer == m_scrollLayer.get()) { 1310 } else if (graphicsLayer == m_scrollLayer.get()) {
1316 name = "LocalFrame Scrolling Layer"; 1311 name = "LocalFrame Scrolling Layer";
1317 } else { 1312 } else {
1318 ASSERT_NOT_REACHED(); 1313 ASSERT_NOT_REACHED();
1319 } 1314 }
1320 1315
1321 return name; 1316 return name;
1322 } 1317 }
1323 1318
1324 } // namespace WebCore 1319 } // 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