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

Side by Side Diff: Source/core/rendering/PaintInvalidationState.cpp

Issue 566433002: Don't clip invalidation of composited scrolling contents (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/rendering/PaintInvalidationState.h" 6 #include "core/rendering/PaintInvalidationState.h"
7 7
8 #include "core/rendering/RenderInline.h" 8 #include "core/rendering/RenderInline.h"
9 #include "core/rendering/RenderLayer.h" 9 #include "core/rendering/RenderLayer.h"
10 #include "core/rendering/RenderView.h" 10 #include "core/rendering/RenderView.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present. 81 // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present.
82 } 82 }
83 83
84 void PaintInvalidationState::applyClipIfNeeded(const RenderObject& renderer) 84 void PaintInvalidationState::applyClipIfNeeded(const RenderObject& renderer)
85 { 85 {
86 if (!renderer.hasOverflowClip()) 86 if (!renderer.hasOverflowClip())
87 return; 87 return;
88 88
89 const RenderBox& box = toRenderBox(renderer); 89 const RenderBox& box = toRenderBox(renderer);
90 m_paintOffset -= box.scrolledContentOffset();
91
92 // Do not clip scroll layer contents because the compositor expects the whol e layer
93 // to be always invalidated in-time.
94 if (box.usesCompositedScrolling()) {
95 ASSERT(!m_clipped); // The box should establish paint invalidation conta iner, so no m_clipped inherited.
96 return;
97 }
98
90 LayoutRect clipRect(toPoint(m_paintOffset), box.layer()->size()); 99 LayoutRect clipRect(toPoint(m_paintOffset), box.layer()->size());
91 if (m_clipped) { 100 if (m_clipped) {
92 m_clipRect.intersect(clipRect); 101 m_clipRect.intersect(clipRect);
93 } else { 102 } else {
94 m_clipRect = clipRect; 103 m_clipRect = clipRect;
95 m_clipped = true; 104 m_clipped = true;
96 } 105 }
97 m_paintOffset -= box.scrolledContentOffset();
98 } 106 }
99 107
100 } // namespace blink 108 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698