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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 708 use_color_estimator_; | 708 use_color_estimator_; |
| 709 managed_tile_state.picture_pile_analysis.is_transparent &= | 709 managed_tile_state.picture_pile_analysis.is_transparent &= |
| 710 use_color_estimator_; | 710 use_color_estimator_; |
| 711 managed_tile_state.picture_pile_analyzed = true; | 711 managed_tile_state.picture_pile_analyzed = true; |
| 712 | 712 |
| 713 if (managed_tile_state.picture_pile_analysis.is_solid_color) | 713 if (managed_tile_state.picture_pile_analysis.is_solid_color) |
| 714 tile->drawing_info().set_solid_color( | 714 tile->drawing_info().set_solid_color( |
| 715 managed_tile_state.picture_pile_analysis.solid_color); | 715 managed_tile_state.picture_pile_analysis.solid_color); |
| 716 else if (managed_tile_state.picture_pile_analysis.is_transparent) | 716 else if (managed_tile_state.picture_pile_analysis.is_transparent) |
| 717 tile->drawing_info().set_transparent(); | 717 tile->drawing_info().set_transparent(); |
| 718 else if (!managed_tile_state.can_use_gpu_memory) | |
|
vmpstr
2013/03/13 21:03:08
I think the only way to get to this code path is i
Leandro GraciĆ” Gil
2013/03/19 17:30:07
Done.
| |
| 719 tile->drawing_info().set_picture_pile(); | |
| 718 } | 720 } |
| 719 } | 721 } |
| 720 | 722 |
| 721 void TileManager::GatherPixelRefsForTile(Tile* tile) { | 723 void TileManager::GatherPixelRefsForTile(Tile* tile) { |
| 722 TRACE_EVENT0("cc", "TileManager::GatherPixelRefsForTile"); | 724 TRACE_EVENT0("cc", "TileManager::GatherPixelRefsForTile"); |
| 723 ManagedTileState& managed_tile_state = tile->managed_state(); | 725 ManagedTileState& managed_tile_state = tile->managed_state(); |
| 724 if (managed_tile_state.need_to_gather_pixel_refs) { | 726 if (managed_tile_state.need_to_gather_pixel_refs) { |
| 725 base::TimeTicks gather_begin_time; | 727 base::TimeTicks gather_begin_time; |
| 726 if (record_rendering_stats_) | 728 if (record_rendering_stats_) |
| 727 gather_begin_time = base::TimeTicks::HighResNow(); | 729 gather_begin_time = base::TimeTicks::HighResNow(); |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1090 decode_begin_time = base::TimeTicks::HighResNow(); | 1092 decode_begin_time = base::TimeTicks::HighResNow(); |
| 1091 pixel_ref->Decode(); | 1093 pixel_ref->Decode(); |
| 1092 if (stats) { | 1094 if (stats) { |
| 1093 stats->totalDeferredImageDecodeCount++; | 1095 stats->totalDeferredImageDecodeCount++; |
| 1094 stats->totalDeferredImageDecodeTime += | 1096 stats->totalDeferredImageDecodeTime += |
| 1095 base::TimeTicks::HighResNow() - decode_begin_time; | 1097 base::TimeTicks::HighResNow() - decode_begin_time; |
| 1096 } | 1098 } |
| 1097 } | 1099 } |
| 1098 | 1100 |
| 1099 } // namespace cc | 1101 } // namespace cc |
| OLD | NEW |