| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 } | 230 } |
| 231 | 231 |
| 232 if (m_update.paintRects.size() > maxPaintRects) | 232 if (m_update.paintRects.size() > maxPaintRects) |
| 233 combinePaintRects(); | 233 combinePaintRects(); |
| 234 | 234 |
| 235 // Track how large the paintRects vector grows during an invalidation | 235 // Track how large the paintRects vector grows during an invalidation |
| 236 // sequence. Note: A subsequent invalidation may end up being combined | 236 // sequence. Note: A subsequent invalidation may end up being combined |
| 237 // with all existing paints, which means that tracking the size of | 237 // with all existing paints, which means that tracking the size of |
| 238 // paintRects at the time when popPendingUpdate() is called may mask | 238 // paintRects at the time when popPendingUpdate() is called may mask |
| 239 // certain performance problems. | 239 // certain performance problems. |
| 240 blink::Platform::current()->histogramCustomCounts("MPArch.RW_IntermediatePai
ntRectCount", | 240 Platform::current()->histogramCustomCounts("MPArch.RW_IntermediatePaintRectC
ount", |
| 241 m_update.paintRects.size(), 1, 100, 50
); | 241 m_update.paintRects.size(), 1, 100, 50
); |
| 242 } | 242 } |
| 243 | 243 |
| 244 void PaintAggregator::scrollRect(int dx, int dy, const IntRect& clipRect) | 244 void PaintAggregator::scrollRect(int dx, int dy, const IntRect& clipRect) |
| 245 { | 245 { |
| 246 // We only support scrolling along one axis at a time. | 246 // We only support scrolling along one axis at a time. |
| 247 if (dx && dy) { | 247 if (dx && dy) { |
| 248 invalidateRect(clipRect); | 248 invalidateRect(clipRect); |
| 249 return; | 249 return; |
| 250 } | 250 } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 else | 364 else |
| 365 outer.unite(existingRect); | 365 outer.unite(existingRect); |
| 366 } | 366 } |
| 367 m_update.paintRects.clear(); | 367 m_update.paintRects.clear(); |
| 368 m_update.paintRects.append(inner); | 368 m_update.paintRects.append(inner); |
| 369 m_update.paintRects.append(outer); | 369 m_update.paintRects.append(outer); |
| 370 } | 370 } |
| 371 } | 371 } |
| 372 | 372 |
| 373 } // namespace blink | 373 } // namespace blink |
| OLD | NEW |