| 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 5f0e1c09483469573970f453e321b5aaa6cf92fb..f07d3003234c78ab1dab059ff76529d09479eac5 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| @@ -61,6 +61,7 @@
|
| #include "platform/geometry/TransformState.h"
|
| #include "platform/graphics/BitmapImage.h"
|
| #include "platform/graphics/GraphicsContext.h"
|
| +#include "platform/graphics/GraphicsScreen.h"
|
| #include "platform/graphics/paint/ClipDisplayItem.h"
|
| #include "platform/graphics/paint/CullRect.h"
|
| #include "platform/graphics/paint/PaintController.h"
|
| @@ -1955,6 +1956,8 @@ void CompositedLayerMapping::updateImageContents()
|
| if (!image)
|
| return;
|
|
|
| + uintptr_t previousId = setCurrentScreenId(Page::screenId(layoutObject()->frame()->page()));
|
| +
|
| // This is a no-op if the layer doesn't have an inner layer for the image.
|
| m_graphicsLayer->setContentsToImage(image, LayoutObject::shouldRespectImageOrientation(imageLayoutObject));
|
|
|
| @@ -1967,6 +1970,8 @@ void CompositedLayerMapping::updateImageContents()
|
| // the image. So we have to kick the animation each time; this has the downside that the
|
| // image will keep animating, even if its layer is not visible.
|
| image->startAnimation();
|
| +
|
| + setCurrentScreenId(previousId);
|
| }
|
|
|
| FloatPoint3D CompositedLayerMapping::computeTransformOrigin(const IntRect& borderBox) const
|
| @@ -2358,6 +2363,9 @@ void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G
|
| {
|
| // https://code.google.com/p/chromium/issues/detail?id=343772
|
| DisableCompositingQueryAsserts disabler;
|
| +
|
| + uintptr_t previousId = setCurrentScreenId(Page::screenId(layoutObject()->frame()->page()));
|
| +
|
| #if ENABLE(ASSERT)
|
| // FIXME: once the state machine is ready, this can be removed and we can refer to that instead.
|
| if (Page* page = layoutObject()->frame()->page())
|
| @@ -2413,11 +2421,15 @@ void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G
|
| ScrollableAreaPainter(*m_owningLayer.scrollableArea()).paintScrollCorner(context, -scrollCornerAndResizerLocation, cullRect);
|
| ScrollableAreaPainter(*m_owningLayer.scrollableArea()).paintResizer(context, -scrollCornerAndResizerLocation, cullRect);
|
| }
|
| +
|
| InspectorInstrumentation::didPaint(m_owningLayer.layoutObject(), graphicsLayer, context, LayoutRect(interestRect));
|
| +
|
| #if ENABLE(ASSERT)
|
| if (Page* page = layoutObject()->frame()->page())
|
| page->setIsPainting(false);
|
| #endif
|
| +
|
| + setCurrentScreenId(previousId);
|
| }
|
|
|
| bool CompositedLayerMapping::isTrackingPaintInvalidations() const
|
|
|