Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(990)

Side by Side Diff: cc/resources/picture_layer_tiling.cc

Issue 19308003: Merge 210713 "cc: Remove tile ref counting in tile manager." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1547/src/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/resources/tile.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/resources/picture_layer_tiling.h" 5 #include "cc/resources/picture_layer_tiling.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // Iterate to delete all tiles outside of our new live_tiles rect. 445 // Iterate to delete all tiles outside of our new live_tiles rect.
446 for (TilingData::DifferenceIterator iter(&tiling_data_, 446 for (TilingData::DifferenceIterator iter(&tiling_data_,
447 live_tiles_rect_, 447 live_tiles_rect_,
448 new_live_tiles_rect); 448 new_live_tiles_rect);
449 iter; 449 iter;
450 ++iter) { 450 ++iter) {
451 TileMapKey key(iter.index()); 451 TileMapKey key(iter.index());
452 TileMap::iterator found = tiles_.find(key); 452 TileMap::iterator found = tiles_.find(key);
453 // If the tile was outside of the recorded region, it won't exist even 453 // If the tile was outside of the recorded region, it won't exist even
454 // though it was in the live rect. 454 // though it was in the live rect.
455 if (found == tiles_.end()) 455 if (found != tiles_.end())
456 continue; 456 tiles_.erase(found);
457 tiles_.erase(found);
458 } 457 }
459 458
460 const PictureLayerTiling* twin_tiling = client_->GetTwinTiling(this); 459 const PictureLayerTiling* twin_tiling = client_->GetTwinTiling(this);
461 460
462 // Iterate to allocate new tiles for all regions with newly exposed area. 461 // Iterate to allocate new tiles for all regions with newly exposed area.
463 for (TilingData::DifferenceIterator iter(&tiling_data_, 462 for (TilingData::DifferenceIterator iter(&tiling_data_,
464 new_live_tiles_rect, 463 new_live_tiles_rect,
465 live_tiles_rect_); 464 live_tiles_rect_);
466 iter; 465 iter;
467 ++iter) { 466 ++iter) {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 626
628 // If our delta is less then our event distance, we're done. 627 // If our delta is less then our event distance, we're done.
629 if (delta < event.distance) 628 if (delta < event.distance)
630 break; 629 break;
631 } 630 }
632 631
633 return gfx::Rect(origin_x, origin_y, width, height); 632 return gfx::Rect(origin_x, origin_y, width, height);
634 } 633 }
635 634
636 } // namespace cc 635 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resources/tile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698