| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "cc/playback/picture_pile.h" | 5 #include "cc/playback/picture_pile.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 | 475 |
| 476 PictureMap::iterator picture_it = picture_map_.find(key); | 476 PictureMap::iterator picture_it = picture_map_.find(key); |
| 477 if (picture_it == picture_map_.end()) | 477 if (picture_it == picture_map_.end()) |
| 478 continue; | 478 continue; |
| 479 | 479 |
| 480 updated = true; | 480 updated = true; |
| 481 picture_map_.erase(key); | 481 picture_map_.erase(key); |
| 482 | 482 |
| 483 // Invalidate drops the picture so the whole tile better be invalidated | 483 // Invalidate drops the picture so the whole tile better be invalidated |
| 484 // if it won't be re-recorded below. | 484 // if it won't be re-recorded below. |
| 485 DCHECK_IMPLIES(!tiling_.TileBounds(key.first, key.second) | 485 DCHECK(tiling_.TileBounds(key.first, key.second) |
| 486 .Intersects(interest_rect_over_tiles), | 486 .Intersects(interest_rect_over_tiles) || |
| 487 invalidation_expanded_to_full_tiles.Contains( | 487 invalidation_expanded_to_full_tiles.Contains( |
| 488 tiling_.TileBounds(key.first, key.second))); | 488 tiling_.TileBounds(key.first, key.second))); |
| 489 } | 489 } |
| 490 } | 490 } |
| 491 invalidation->Union(invalidation_expanded_to_full_tiles); | 491 invalidation->Union(invalidation_expanded_to_full_tiles); |
| 492 } | 492 } |
| 493 | 493 |
| 494 invalidation->Union(synthetic_invalidation); | 494 invalidation->Union(synthetic_invalidation); |
| 495 return updated; | 495 return updated; |
| 496 } | 496 } |
| 497 | 497 |
| 498 void PicturePile::GetInvalidTileRects(const gfx::Rect& interest_rect, | 498 void PicturePile::GetInvalidTileRects(const gfx::Rect& interest_rect, |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 | 690 |
| 691 void PicturePile::SetBufferPixels(int new_buffer_pixels) { | 691 void PicturePile::SetBufferPixels(int new_buffer_pixels) { |
| 692 if (new_buffer_pixels == buffer_pixels()) | 692 if (new_buffer_pixels == buffer_pixels()) |
| 693 return; | 693 return; |
| 694 | 694 |
| 695 Clear(); | 695 Clear(); |
| 696 tiling_.SetBorderTexels(new_buffer_pixels); | 696 tiling_.SetBorderTexels(new_buffer_pixels); |
| 697 } | 697 } |
| 698 | 698 |
| 699 } // namespace cc | 699 } // namespace cc |
| OLD | NEW |