OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "core/paint/ObjectPaintInvalidator.h" | 5 #include "core/paint/ObjectPaintInvalidator.h" |
6 | 6 |
7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
9 #include "core/layout/LayoutBlockFlow.h" | 9 #include "core/layout/LayoutBlockFlow.h" |
10 #include "core/layout/compositing/CompositedLayerMapping.h" | 10 #include "core/layout/compositing/CompositedLayerMapping.h" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 return value; | 192 return value; |
193 } | 193 } |
194 | 194 |
195 static void invalidatePaintRectangleOnWindow(const LayoutBoxModelObject& paintIn
validationContainer, const IntRect& dirtyRect) | 195 static void invalidatePaintRectangleOnWindow(const LayoutBoxModelObject& paintIn
validationContainer, const IntRect& dirtyRect) |
196 { | 196 { |
197 FrameView* frameView = paintInvalidationContainer.frameView(); | 197 FrameView* frameView = paintInvalidationContainer.frameView(); |
198 DCHECK(paintInvalidationContainer.isLayoutView() && paintInvalidationContain
er.layer()->compositingState() == NotComposited); | 198 DCHECK(paintInvalidationContainer.isLayoutView() && paintInvalidationContain
er.layer()->compositingState() == NotComposited); |
199 if (!frameView || paintInvalidationContainer.document().printing()) | 199 if (!frameView || paintInvalidationContainer.document().printing()) |
200 return; | 200 return; |
201 | 201 |
202 DCHECK(!frameView->frame().ownerLayoutObject()); | 202 DCHECK(frameView->frame().ownerLayoutItem().isNull()); |
203 | 203 |
204 IntRect paintRect = dirtyRect; | 204 IntRect paintRect = dirtyRect; |
205 paintRect.intersect(frameView->visibleContentRect()); | 205 paintRect.intersect(frameView->visibleContentRect()); |
206 if (paintRect.isEmpty()) | 206 if (paintRect.isEmpty()) |
207 return; | 207 return; |
208 | 208 |
209 if (HostWindow* window = frameView->getHostWindow()) | 209 if (HostWindow* window = frameView->getHostWindow()) |
210 window->invalidateRect(frameView->contentsToRootFrame(paintRect)); | 210 window->invalidateRect(frameView->contentsToRootFrame(paintRect)); |
211 } | 211 } |
212 | 212 |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 m_object.invalidateDisplayItemClients(reason); | 467 m_object.invalidateDisplayItemClients(reason); |
468 return reason; | 468 return reason; |
469 } | 469 } |
470 | 470 |
471 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts() | 471 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts() |
472 : m_disabler(&gDisablePaintInvalidationStateAsserts, true) | 472 : m_disabler(&gDisablePaintInvalidationStateAsserts, true) |
473 { | 473 { |
474 } | 474 } |
475 | 475 |
476 } // namespace blink | 476 } // namespace blink |
OLD | NEW |