OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/renderer/paint_aggregator.h" | 5 #include "content/renderer/paint_aggregator.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 | 9 |
10 // ---------------------------------------------------------------------------- | 10 // ---------------------------------------------------------------------------- |
11 // ALGORITHM NOTES | 11 // ALGORITHM NOTES |
12 // | 12 // |
13 // We attempt to maintain a scroll rect in the presence of invalidations that | 13 // We attempt to maintain a scroll rect in the presence of invalidations that |
14 // are contained within the scroll rect. If an invalidation crosses a scroll | 14 // are contained within the scroll rect. If an invalidation crosses a scroll |
15 // rect, then we just treat the scroll rect as an invalidation rect. | 15 // rect, then we just treat the scroll rect as an invalidation rect. |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 inner = inner.Union(existing_rect); | 275 inner = inner.Union(existing_rect); |
276 } else { | 276 } else { |
277 outer = outer.Union(existing_rect); | 277 outer = outer.Union(existing_rect); |
278 } | 278 } |
279 } | 279 } |
280 update_.paint_rects.clear(); | 280 update_.paint_rects.clear(); |
281 update_.paint_rects.push_back(inner); | 281 update_.paint_rects.push_back(inner); |
282 update_.paint_rects.push_back(outer); | 282 update_.paint_rects.push_back(outer); |
283 } | 283 } |
284 } | 284 } |
OLD | NEW |