Chromium Code Reviews| 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/tile_manager.h" | 5 #include "cc/tile_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 744 tile->content_rect(), | 744 tile->content_rect(), |
| 745 tile->contents_scale(), | 745 tile->contents_scale(), |
| 746 &managed_tile_state.picture_pile_analysis); | 746 &managed_tile_state.picture_pile_analysis); |
| 747 managed_tile_state.picture_pile_analysis.is_cheap_to_raster &= | 747 managed_tile_state.picture_pile_analysis.is_cheap_to_raster &= |
| 748 use_cheapness_estimator_; | 748 use_cheapness_estimator_; |
| 749 managed_tile_state.picture_pile_analysis.is_solid_color &= | 749 managed_tile_state.picture_pile_analysis.is_solid_color &= |
| 750 use_color_estimator_; | 750 use_color_estimator_; |
| 751 managed_tile_state.picture_pile_analysis.is_transparent &= | 751 managed_tile_state.picture_pile_analysis.is_transparent &= |
| 752 use_color_estimator_; | 752 use_color_estimator_; |
| 753 managed_tile_state.picture_pile_analyzed = true; | 753 managed_tile_state.picture_pile_analyzed = true; |
| 754 managed_tile_state.need_to_gather_pixel_refs = false; | |
| 755 managed_tile_state.pending_pixel_refs.swap( | |
|
Tom Hudson
2013/03/18 11:52:39
Is swap really the right way to combine these? All
| |
| 756 managed_tile_state.picture_pile_analysis.lazy_pixel_refs); | |
| 754 } | 757 } |
| 755 } | 758 } |
| 756 | 759 |
| 757 void TileManager::GatherPixelRefsForTile(Tile* tile) { | 760 void TileManager::GatherPixelRefsForTile(Tile* tile) { |
| 758 TRACE_EVENT0("cc", "TileManager::GatherPixelRefsForTile"); | 761 TRACE_EVENT0("cc", "TileManager::GatherPixelRefsForTile"); |
| 759 ManagedTileState& managed_tile_state = tile->managed_state(); | 762 ManagedTileState& managed_tile_state = tile->managed_state(); |
| 760 if (managed_tile_state.need_to_gather_pixel_refs) { | 763 if (managed_tile_state.need_to_gather_pixel_refs) { |
| 761 base::TimeTicks gather_begin_time; | 764 base::TimeTicks gather_begin_time; |
| 762 if (record_rendering_stats_) | 765 if (record_rendering_stats_) |
| 763 gather_begin_time = base::TimeTicks::HighResNow(); | 766 gather_begin_time = base::TimeTicks::HighResNow(); |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1123 decode_begin_time = base::TimeTicks::HighResNow(); | 1126 decode_begin_time = base::TimeTicks::HighResNow(); |
| 1124 pixel_ref->Decode(); | 1127 pixel_ref->Decode(); |
| 1125 if (stats) { | 1128 if (stats) { |
| 1126 stats->totalDeferredImageDecodeCount++; | 1129 stats->totalDeferredImageDecodeCount++; |
| 1127 stats->totalDeferredImageDecodeTime += | 1130 stats->totalDeferredImageDecodeTime += |
| 1128 base::TimeTicks::HighResNow() - decode_begin_time; | 1131 base::TimeTicks::HighResNow() - decode_begin_time; |
| 1129 } | 1132 } |
| 1130 } | 1133 } |
| 1131 | 1134 |
| 1132 } // namespace cc | 1135 } // namespace cc |
| OLD | NEW |