Lines Matching defs:rect

14 // We attempt to maintain a scroll rect in the presence of invalidations that
15 // are contained within the scroll rect. If an invalidation crosses a scroll
16 // rect, then we just treat the scroll rect as an invalidation rect.
19 // scroll rect, we offset the invalidation rects to account for the fact that
71 // In case the scroll offset exceeds the width/height of the scroll rect
95 // Code invalidates damaged rect here, it pick it up from the list of paint
122 void PaintAggregator::InvalidateRect(const pp::Rect& rect) {
123 InvalidateRectInternal(rect, true);
134 // We can only scroll one rect at a time.
148 // The scroll rect is new or isn't changing (though the scroll amount may
170 pp::Rect rect = update_.paint_rects[i];
171 while (!rect.IsEmpty()) {
172 pp::Rect leftover = rect.Subtract(intersection);
178 rect = rect.Subtract(leftover);
183 // The rect may have been scrolled out of view.
194 if (update_.scroll_rect.Contains(update_.ready_rects[i].rect)) {
195 update_.ready_rects[i].rect =
196 ScrollPaintRect(update_.ready_rects[i].rect, amount);
223 pp::Rect rect = rect_old;
226 const pp::Rect& existing_rect = update_.ready_rects[i].rect;
227 if (rect.Intersects(existing_rect)) {
229 rect = existing_rect.Union(rect);
240 if (existing_rect.Contains(rect)) // Optimize out redundancy.
242 if (rect.Intersects(existing_rect) || rect.SharesEdgeWith(existing_rect)) {
244 pp::Rect combined_rect = existing_rect.Union(rect);
253 update_.paint_rects.push_back(rect);
256 // If the new paint overlaps with a scroll, then also invalidate the rect in
260 update_.scroll_rect.Intersects(rect)) {
261 InvalidateRectInternal(ScrollPaintRect(rect, update_.scroll_delta), false);