Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 1331533002: [poc] curve-filter Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Ensure screen device profiles are matrix Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698