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 "content/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 namespace content { |
| 11 |
10 // ---------------------------------------------------------------------------- | 12 // ---------------------------------------------------------------------------- |
11 // ALGORITHM NOTES | 13 // ALGORITHM NOTES |
12 // | 14 // |
13 // We attempt to maintain a scroll rect in the presence of invalidations that | 15 // 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 | 16 // 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. | 17 // rect, then we just treat the scroll rect as an invalidation rect. |
16 // | 18 // |
17 // For invalidations performed prior to scrolling and contained within the | 19 // For invalidations performed prior to scrolling and contained within the |
18 // scroll rect, we offset the invalidation rects to account for the fact that | 20 // scroll rect, we offset the invalidation rects to account for the fact that |
19 // the consumer will perform scrolling before painting. | 21 // the consumer will perform scrolling before painting. |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 inner = inner.Union(existing_rect); | 276 inner = inner.Union(existing_rect); |
275 } else { | 277 } else { |
276 outer = outer.Union(existing_rect); | 278 outer = outer.Union(existing_rect); |
277 } | 279 } |
278 } | 280 } |
279 update_.paint_rects.clear(); | 281 update_.paint_rects.clear(); |
280 update_.paint_rects.push_back(inner); | 282 update_.paint_rects.push_back(inner); |
281 update_.paint_rects.push_back(outer); | 283 update_.paint_rects.push_back(outer); |
282 } | 284 } |
283 } | 285 } |
| 286 |
| 287 } // namespace content |
OLD | NEW |