| OLD | NEW |
| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "core/loader/resource/ImageResourceContent.h" | 50 #include "core/loader/resource/ImageResourceContent.h" |
| 51 #include "core/page/ChromeClient.h" | 51 #include "core/page/ChromeClient.h" |
| 52 #include "core/page/Page.h" | 52 #include "core/page/Page.h" |
| 53 #include "core/page/scrolling/ScrollingCoordinator.h" | 53 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 54 #include "core/page/scrolling/StickyPositionScrollingConstraints.h" | 54 #include "core/page/scrolling/StickyPositionScrollingConstraints.h" |
| 55 #include "core/page/scrolling/TopDocumentRootScrollerController.h" | 55 #include "core/page/scrolling/TopDocumentRootScrollerController.h" |
| 56 #include "core/paint/ObjectPaintInvalidator.h" | 56 #include "core/paint/ObjectPaintInvalidator.h" |
| 57 #include "core/paint/PaintInfo.h" | 57 #include "core/paint/PaintInfo.h" |
| 58 #include "core/paint/PaintLayerPainter.h" | 58 #include "core/paint/PaintLayerPainter.h" |
| 59 #include "core/paint/PaintLayerStackingNodeIterator.h" | 59 #include "core/paint/PaintLayerStackingNodeIterator.h" |
| 60 #include "core/paint/PaintTiming.h" | |
| 61 #include "core/paint/ScrollableAreaPainter.h" | 60 #include "core/paint/ScrollableAreaPainter.h" |
| 62 #include "core/paint/TransformRecorder.h" | 61 #include "core/paint/TransformRecorder.h" |
| 63 #include "core/plugins/PluginView.h" | 62 #include "core/plugins/PluginView.h" |
| 64 #include "platform/LengthFunctions.h" | 63 #include "platform/LengthFunctions.h" |
| 65 #include "platform/RuntimeEnabledFeatures.h" | 64 #include "platform/RuntimeEnabledFeatures.h" |
| 66 #include "platform/fonts/FontCache.h" | 65 #include "platform/fonts/FontCache.h" |
| 67 #include "platform/geometry/TransformState.h" | 66 #include "platform/geometry/TransformState.h" |
| 68 #include "platform/graphics/BitmapImage.h" | 67 #include "platform/graphics/BitmapImage.h" |
| 69 #include "platform/graphics/CompositorFilterOperations.h" | 68 #include "platform/graphics/CompositorFilterOperations.h" |
| 70 #include "platform/graphics/CompositorMutableProperties.h" | 69 #include "platform/graphics/CompositorMutableProperties.h" |
| (...skipping 3206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3277 return; | 3276 return; |
| 3278 LayoutObject* targetObject = targetElement->layoutObject(); | 3277 LayoutObject* targetObject = targetElement->layoutObject(); |
| 3279 if (!targetObject) | 3278 if (!targetObject) |
| 3280 return; | 3279 return; |
| 3281 targetObject->enclosingLayer()->setNeedsRepaint(); | 3280 targetObject->enclosingLayer()->setNeedsRepaint(); |
| 3282 // TODO(wkorman): Consider revising the below to invalidate all | 3281 // TODO(wkorman): Consider revising the below to invalidate all |
| 3283 // non-compositing descendants as well. | 3282 // non-compositing descendants as well. |
| 3284 targetObject->invalidateDisplayItemClients(PaintInvalidationForTesting); | 3283 targetObject->invalidateDisplayItemClients(PaintInvalidationForTesting); |
| 3285 } | 3284 } |
| 3286 | 3285 |
| 3287 void CompositedLayerMapping::notifyPaint(bool isFirstPaint, | |
| 3288 bool textPainted, | |
| 3289 bool imagePainted) { | |
| 3290 if (PaintTiming* timing = m_owningLayer.paintTiming()) | |
| 3291 timing->notifyPaint(isFirstPaint, textPainted, imagePainted); | |
| 3292 } | |
| 3293 | |
| 3294 IntRect CompositedLayerMapping::pixelSnappedCompositedBounds() const { | 3286 IntRect CompositedLayerMapping::pixelSnappedCompositedBounds() const { |
| 3295 LayoutRect bounds = m_compositedBounds; | 3287 LayoutRect bounds = m_compositedBounds; |
| 3296 bounds.move(m_owningLayer.subpixelAccumulation()); | 3288 bounds.move(m_owningLayer.subpixelAccumulation()); |
| 3297 return pixelSnappedIntRect(bounds); | 3289 return pixelSnappedIntRect(bounds); |
| 3298 } | 3290 } |
| 3299 | 3291 |
| 3300 bool CompositedLayerMapping::invalidateLayerIfNoPrecedingEntry( | 3292 bool CompositedLayerMapping::invalidateLayerIfNoPrecedingEntry( |
| 3301 size_t indexToClear) { | 3293 size_t indexToClear) { |
| 3302 PaintLayer* layerToRemove = m_squashedLayers[indexToClear].paintLayer; | 3294 PaintLayer* layerToRemove = m_squashedLayers[indexToClear].paintLayer; |
| 3303 size_t previousIndex = 0; | 3295 size_t previousIndex = 0; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3444 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { | 3436 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { |
| 3445 name = "Decoration Layer"; | 3437 name = "Decoration Layer"; |
| 3446 } else { | 3438 } else { |
| 3447 ASSERT_NOT_REACHED(); | 3439 ASSERT_NOT_REACHED(); |
| 3448 } | 3440 } |
| 3449 | 3441 |
| 3450 return name; | 3442 return name; |
| 3451 } | 3443 } |
| 3452 | 3444 |
| 3453 } // namespace blink | 3445 } // namespace blink |
| OLD | NEW |