Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 486 } else { | 486 } else { |
| 487 ++m_secondaryCompositedLayerCount; | 487 ++m_secondaryCompositedLayerCount; |
| 488 m_secondaryBackingStoreBytes += backing->backingStoreMemoryEstimate(); | 488 m_secondaryBackingStoreBytes += backing->backingStoreMemoryEstimate(); |
| 489 } | 489 } |
| 490 | 490 |
| 491 String layerName; | 491 String layerName; |
| 492 #ifndef NDEBUG | 492 #ifndef NDEBUG |
| 493 layerName = layer->debugName(); | 493 layerName = layer->debugName(); |
| 494 #endif | 494 #endif |
| 495 | 495 |
| 496 LOG(Compositing, "%*p %dx%d %.2fKB (%s) %s\n", 12 + depth * 2, layer, backin g->compositedBounds().width(), backing->compositedBounds().height(), | 496 LOG(Compositing, "%*p %dx%d %.2fKB (%s) %s\n", 12 + depth * 2, layer, backin g->compositedBounds().width().round(), backing->compositedBounds().height().roun d(), |
|
eae
2013/07/26 20:30:51
Why not log the precise values?
leviw_travelin_and_unemployed
2013/07/26 20:36:21
Good question :)
| |
| 497 backing->backingStoreMemoryEstimate() / 1024, | 497 backing->backingStoreMemoryEstimate() / 1024, |
| 498 logReasonsForCompositing(layer), layerName.utf8().data()); | 498 logReasonsForCompositing(layer), layerName.utf8().data()); |
| 499 } | 499 } |
| 500 #endif | 500 #endif |
| 501 | 501 |
| 502 void RenderLayerCompositor::addOutOfFlowPositionedLayer(RenderLayer* layer) | 502 void RenderLayerCompositor::addOutOfFlowPositionedLayer(RenderLayer* layer) |
| 503 { | 503 { |
| 504 m_outOfFlowPositionedLayers.add(layer); | 504 m_outOfFlowPositionedLayers.add(layer); |
| 505 } | 505 } |
| 506 | 506 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 631 | 631 |
| 632 LayoutRect repaintRect = rect; | 632 LayoutRect repaintRect = rect; |
| 633 repaintRect.moveBy(offset); | 633 repaintRect.moveBy(offset); |
| 634 | 634 |
| 635 compositedAncestor->setBackingNeedsRepaintInRect(repaintRect); | 635 compositedAncestor->setBackingNeedsRepaintInRect(repaintRect); |
| 636 } | 636 } |
| 637 } | 637 } |
| 638 | 638 |
| 639 // The bounds of the GraphicsLayer created for a compositing layer is the union of the bounds of all the descendant | 639 // The bounds of the GraphicsLayer created for a compositing layer is the union of the bounds of all the descendant |
| 640 // RenderLayers that are rendered by the composited RenderLayer. | 640 // RenderLayers that are rendered by the composited RenderLayer. |
| 641 IntRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* laye r, const RenderLayer* ancestorLayer) const | 641 LayoutRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* l ayer, const RenderLayer* ancestorLayer) const |
| 642 { | 642 { |
| 643 if (!canBeComposited(layer)) | 643 if (!canBeComposited(layer)) |
| 644 return IntRect(); | 644 return LayoutRect(); |
| 645 | 645 |
| 646 RenderLayer::CalculateLayerBoundsFlags flags = RenderLayer::DefaultCalculate LayerBoundsFlags | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontCons trainForMask; | 646 RenderLayer::CalculateLayerBoundsFlags flags = RenderLayer::DefaultCalculate LayerBoundsFlags | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontCons trainForMask; |
| 647 #if HAVE(COMPOSITOR_FILTER_OUTSETS) | 647 #if HAVE(COMPOSITOR_FILTER_OUTSETS) |
| 648 // If the compositor computes its own filter outsets, don't include them in the composited bounds. | 648 // If the compositor computes its own filter outsets, don't include them in the composited bounds. |
| 649 if (!layer->paintsWithFilters()) | 649 if (!layer->paintsWithFilters()) |
| 650 flags &= ~RenderLayer::IncludeLayerFilterOutsets; | 650 flags &= ~RenderLayer::IncludeLayerFilterOutsets; |
| 651 #endif | 651 #endif |
| 652 return layer->calculateLayerBounds(ancestorLayer, 0, flags); | 652 return layer->calculateLayerBounds(ancestorLayer, 0, flags); |
| 653 } | 653 } |
| 654 | 654 |
| (...skipping 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2715 | 2715 |
| 2716 Page* RenderLayerCompositor::page() const | 2716 Page* RenderLayerCompositor::page() const |
| 2717 { | 2717 { |
| 2718 if (Frame* frame = m_renderView->frameView()->frame()) | 2718 if (Frame* frame = m_renderView->frameView()->frame()) |
| 2719 return frame->page(); | 2719 return frame->page(); |
| 2720 | 2720 |
| 2721 return 0; | 2721 return 0; |
| 2722 } | 2722 } |
| 2723 | 2723 |
| 2724 } // namespace WebCore | 2724 } // namespace WebCore |
| OLD | NEW |