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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 1416053003: Let synchronized painting generate correct paint invalidation rects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 void LayoutView::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalidatio nState) 383 void LayoutView::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalidatio nState)
384 { 384 {
385 ASSERT(!needsLayout()); 385 ASSERT(!needsLayout());
386 386
387 // We specifically need to issue paint invalidations for the viewRect since other layoutObjects 387 // We specifically need to issue paint invalidations for the viewRect since other layoutObjects
388 // short-circuit on full-paint invalidation. 388 // short-circuit on full-paint invalidation.
389 LayoutRect dirtyRect = viewRect(); 389 LayoutRect dirtyRect = viewRect();
390 if (doingFullPaintInvalidation() && !dirtyRect.isEmpty()) { 390 if (doingFullPaintInvalidation() && !dirtyRect.isEmpty()) {
391 const LayoutBoxModelObject& paintInvalidationContainer = paintInvalidati onState.paintInvalidationContainer(); 391 const LayoutBoxModelObject& paintInvalidationContainer = paintInvalidati onState.paintInvalidationContainer();
392 PaintLayer::mapRectToPaintInvalidationBacking(this, &paintInvalidationCo ntainer, dirtyRect, &paintInvalidationState); 392 PaintLayer::mapRectToPaintInvalidationBacking(this, &paintInvalidationCo ntainer, dirtyRect, &paintInvalidationState);
393 invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRect, Pai ntInvalidationFull); 393 Vector<LayoutRect> paintInvalidationRects;
394 invalidateDisplayItemClients(paintInvalidationContainer, PaintInvalidati onFull, dirtyRect, dirtyRect); 394 invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRect, Pai ntInvalidationFull, paintInvalidationRects);
395 invalidateDisplayItemClients(paintInvalidationContainer, PaintInvalidati onFull, paintInvalidationRects);
395 } 396 }
396 LayoutBlock::invalidateTreeIfNeeded(paintInvalidationState); 397 LayoutBlock::invalidateTreeIfNeeded(paintInvalidationState);
397 } 398 }
398 399
399 static void setShouldDoFullPaintInvalidationForViewAndAllDescendantsInternal(Lay outObject* object) 400 static void setShouldDoFullPaintInvalidationForViewAndAllDescendantsInternal(Lay outObject* object)
400 { 401 {
401 object->setShouldDoFullPaintInvalidation(); 402 object->setShouldDoFullPaintInvalidation();
402 for (LayoutObject* child = object->slowFirstChild(); child; child = child->n extSibling()) { 403 for (LayoutObject* child = object->slowFirstChild(); child; child = child->n extSibling()) {
403 setShouldDoFullPaintInvalidationForViewAndAllDescendantsInternal(child); 404 setShouldDoFullPaintInvalidationForViewAndAllDescendantsInternal(child);
404 } 405 }
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 return viewHeight(IncludeScrollbars) / scale; 940 return viewHeight(IncludeScrollbars) / scale;
940 } 941 }
941 942
942 void LayoutView::willBeDestroyed() 943 void LayoutView::willBeDestroyed()
943 { 944 {
944 LayoutBlockFlow::willBeDestroyed(); 945 LayoutBlockFlow::willBeDestroyed();
945 m_compositor.clear(); 946 m_compositor.clear();
946 } 947 }
947 948
948 } // namespace blink 949 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698