| 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 30e135002b71f81264f1344df3ff75f272bb0f85..7e79f98fea0a9aba7721cacee291687049f104d9 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
|
| @@ -63,6 +63,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"
|
| @@ -1921,6 +1922,8 @@ void CompositedLayerMapping::updateImageContents()
|
| if (!image)
|
| return;
|
|
|
| + int64_t previousId = setCurrentScreenId(reinterpret_cast<int64_t>(layoutObject()->frame()->page()));
|
| +
|
| // This is a no-op if the layer doesn't have an inner layer for the image.
|
| m_graphicsLayer->setContentsToImage(image, imageLayoutObject->shouldRespectImageOrientation());
|
|
|
| @@ -1933,6 +1936,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
|
| @@ -2325,6 +2330,12 @@ void CompositedLayerMapping::paintContents(const GraphicsLayer* graphicsLayer, G
|
| {
|
| // https://code.google.com/p/chromium/issues/detail?id=343772
|
| DisableCompositingQueryAsserts disabler;
|
| +
|
| + int64_t previousId = setCurrentScreenId(reinterpret_cast<int64_t>(layoutObject()->frame()->page()));
|
| +
|
| + // fprintf(stderr, "CompositedLayerMapping::paintContents begins page %ld\n", (long int) currentScreenId());
|
| + // fflush(stderr);
|
| +
|
| #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())
|
| @@ -2380,11 +2391,18 @@ 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
|
| +
|
| + // fprintf(stderr, "CompositedLayerMapping::paintContents ends page %ld\n", (long int) currentScreenId());
|
| + // fflush(stderr);
|
| +
|
| + setCurrentScreenId(previousId);
|
| }
|
|
|
| bool CompositedLayerMapping::isTrackingPaintInvalidations() const
|
|
|