| Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| index cb2b7ed3227dc3d06d6377d2d01149bba06a465f..b3027fcef8dab5e7e9851b1b40f06105a6086b38 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| @@ -2766,19 +2766,19 @@ struct SetContentsNeedsDisplayInRectFunctor {
|
| if (layer->drawsContent()) {
|
| IntRect layerDirtyRect = r;
|
| layerDirtyRect.move(-layer->offsetFromLayoutObject());
|
| - layer->setNeedsDisplayInRect(layerDirtyRect, invalidationReason, client);
|
| + layer->setNeedsDisplayInRect(layerDirtyRect, invalidationReason, debug);
|
| }
|
| }
|
|
|
| IntRect r;
|
| PaintInvalidationReason invalidationReason;
|
| - const DisplayItemClient& client;
|
| + const InvalidationDebugging& debug;
|
| };
|
|
|
| void CompositedLayerMapping::setContentsNeedDisplayInRect(
|
| const LayoutRect& r,
|
| PaintInvalidationReason invalidationReason,
|
| - const DisplayItemClient& client) {
|
| + const InvalidationDebugging& debug) {
|
| DCHECK(!m_owningLayer.layoutObject()->usesCompositedScrolling());
|
| // TODO(wangxianzhu): Enable the following assert after paint invalidation for
|
| // spv2 is ready.
|
| @@ -2787,14 +2787,14 @@ void CompositedLayerMapping::setContentsNeedDisplayInRect(
|
| SetContentsNeedsDisplayInRectFunctor functor = {
|
| enclosingIntRect(LayoutRect(
|
| r.location() + m_owningLayer.subpixelAccumulation(), r.size())),
|
| - invalidationReason, client};
|
| + invalidationReason, debug};
|
| ApplyToGraphicsLayers(this, functor, ApplyToContentLayers);
|
| }
|
|
|
| void CompositedLayerMapping::setNonScrollingContentsNeedDisplayInRect(
|
| const LayoutRect& r,
|
| PaintInvalidationReason invalidationReason,
|
| - const DisplayItemClient& client) {
|
| + const InvalidationDebugging& debug) {
|
| DCHECK(m_owningLayer.layoutObject()->usesCompositedScrolling());
|
| // TODO(wangxianzhu): Enable the following assert after paint invalidation for
|
| // spv2 is ready.
|
| @@ -2803,14 +2803,14 @@ void CompositedLayerMapping::setNonScrollingContentsNeedDisplayInRect(
|
| SetContentsNeedsDisplayInRectFunctor functor = {
|
| enclosingIntRect(LayoutRect(
|
| r.location() + m_owningLayer.subpixelAccumulation(), r.size())),
|
| - invalidationReason, client};
|
| + invalidationReason, debug};
|
| ApplyToGraphicsLayers(this, functor, ApplyToNonScrollingContentLayers);
|
| }
|
|
|
| void CompositedLayerMapping::setScrollingContentsNeedDisplayInRect(
|
| const LayoutRect& r,
|
| PaintInvalidationReason invalidationReason,
|
| - const DisplayItemClient& client) {
|
| + const InvalidationDebugging& debug) {
|
| DCHECK(m_owningLayer.layoutObject()->usesCompositedScrolling());
|
| // TODO(wangxianzhu): Enable the following assert after paint invalidation for
|
| // spv2 is ready.
|
| @@ -2819,7 +2819,7 @@ void CompositedLayerMapping::setScrollingContentsNeedDisplayInRect(
|
| SetContentsNeedsDisplayInRectFunctor functor = {
|
| enclosingIntRect(LayoutRect(
|
| r.location() + m_owningLayer.subpixelAccumulation(), r.size())),
|
| - invalidationReason, client};
|
| + invalidationReason, debug};
|
| ApplyToGraphicsLayers(this, functor, ApplyToScrollingContentLayers);
|
| }
|
|
|
| @@ -2889,7 +2889,10 @@ void CompositedLayerMapping::doPaintTask(
|
| IntSize offset = paintInfo.offsetFromLayoutObject;
|
| AffineTransform translation;
|
| translation.translate(-offset.width(), -offset.height());
|
| - TransformRecorder transformRecorder(context, graphicsLayer, translation);
|
| + TransformRecorder transformRecorder(
|
| + context, translation, graphicsLayer.visualRect(),
|
| + graphicsLayer.debugName(),
|
| + graphicsLayer.paintedOutputOfObjectHasNoEffectRegardlessOfSize());
|
|
|
| // The dirtyRect is in the coords of the painting root.
|
| IntRect dirtyRect(clip);
|
| @@ -2960,8 +2963,10 @@ static void paintScrollbar(const Scrollbar* scrollbar,
|
|
|
| const IntRect& scrollbarRect = scrollbar->frameRect();
|
| TransformRecorder transformRecorder(
|
| - context, *scrollbar,
|
| - AffineTransform::translation(-scrollbarRect.x(), -scrollbarRect.y()));
|
| + context,
|
| + AffineTransform::translation(-scrollbarRect.x(), -scrollbarRect.y()),
|
| + scrollbar->visualRect(), scrollbar->debugName(),
|
| + scrollbar->paintedOutputOfObjectHasNoEffectRegardlessOfSize());
|
| IntRect transformedClip = clip;
|
| transformedClip.moveBy(scrollbarRect.location());
|
| scrollbar->paint(context, CullRect(transformedClip));
|
|
|