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

Unified Diff: Source/core/rendering/PaintInvalidationState.cpp

Issue 433603004: Disentangle repaint-after-compositing from updateLayerPositionsAfterLayout (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 4 months 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
« no previous file with comments | « Source/core/rendering/PaintInvalidationState.h ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/PaintInvalidationState.cpp
diff --git a/Source/core/rendering/PaintInvalidationState.cpp b/Source/core/rendering/PaintInvalidationState.cpp
index 65ad3d5be60264465f36bffbd354e1f6daf576b2..3824ce7fbf7888116f0a40b5f8e33ce5d074dd7b 100644
--- a/Source/core/rendering/PaintInvalidationState.cpp
+++ b/Source/core/rendering/PaintInvalidationState.cpp
@@ -16,6 +16,7 @@ namespace blink {
PaintInvalidationState::PaintInvalidationState(RenderObject& renderer)
: m_clipped(false)
, m_cachedOffsetsEnabled(true)
+ , m_forceCheckForPaintInvalidation(false)
, m_paintInvalidationContainer(*renderer.containerForPaintInvalidation())
, m_renderer(renderer)
{
@@ -43,6 +44,7 @@ PaintInvalidationState::PaintInvalidationState(RenderObject& renderer)
PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& next, RenderSVGModelObject& renderer, const RenderLayerModelObject& paintInvalidationContainer)
: m_clipped(next.m_clipped)
, m_cachedOffsetsEnabled(next.m_cachedOffsetsEnabled)
+ , m_forceCheckForPaintInvalidation(next.m_forceCheckForPaintInvalidation)
, m_paintInvalidationContainer(paintInvalidationContainer)
, m_renderer(renderer)
{
@@ -53,11 +55,17 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex
PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& next, RenderInline& renderer, const RenderLayerModelObject& paintInvalidationContainer)
: m_clipped(false)
, m_cachedOffsetsEnabled(true)
+ , m_forceCheckForPaintInvalidation(next.m_forceCheckForPaintInvalidation)
, m_paintInvalidationContainer(paintInvalidationContainer)
, m_renderer(renderer)
{
bool establishesPaintInvalidationContainer = &m_renderer == &m_paintInvalidationContainer;
- if (!establishesPaintInvalidationContainer) {
+ if (establishesPaintInvalidationContainer) {
+ // When we hit a new paint invalidation container, we don't need to
+ // continue forcing a check for paint invalidation because movement
+ // from our parents will just move the whole invalidation container.
+ m_forceCheckForPaintInvalidation = false;
+ } else {
if (!renderer.supportsLayoutStateCachedOffsets() || !next.m_cachedOffsetsEnabled) {
m_cachedOffsetsEnabled = false;
} else if (m_cachedOffsetsEnabled) {
@@ -78,13 +86,19 @@ PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& nex
PaintInvalidationState::PaintInvalidationState(const PaintInvalidationState& next, RenderBox& renderer, const RenderLayerModelObject& paintInvalidationContainer)
: m_clipped(false)
, m_cachedOffsetsEnabled(true)
+ , m_forceCheckForPaintInvalidation(next.m_forceCheckForPaintInvalidation)
, m_paintInvalidationContainer(paintInvalidationContainer)
, m_renderer(renderer)
{
bool establishesPaintInvalidationContainer = &m_renderer == &m_paintInvalidationContainer;
bool fixed = m_renderer.isOutOfFlowPositioned() && m_renderer.style()->position() == FixedPosition;
- if (!establishesPaintInvalidationContainer) {
+ if (establishesPaintInvalidationContainer) {
+ // When we hit a new paint invalidation container, we don't need to
+ // continue forcing a check for paint invalidation because movement
+ // from our parents will just move the whole invalidation container.
+ m_forceCheckForPaintInvalidation = false;
+ } else {
if (!renderer.supportsLayoutStateCachedOffsets() || !next.m_cachedOffsetsEnabled) {
m_cachedOffsetsEnabled = false;
} else {
« no previous file with comments | « Source/core/rendering/PaintInvalidationState.h ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698