| 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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 int64 total_pixels_rasterized = 0; | 928 int64 total_pixels_rasterized = 0; |
| 929 picture_pile->Raster(&canvas, rect, contents_scale, | 929 picture_pile->Raster(&canvas, rect, contents_scale, |
| 930 &total_pixels_rasterized); | 930 &total_pixels_rasterized); |
| 931 | 931 |
| 932 if (stats) { | 932 if (stats) { |
| 933 stats->totalPixelsRasterized += total_pixels_rasterized; | 933 stats->totalPixelsRasterized += total_pixels_rasterized; |
| 934 | 934 |
| 935 base::TimeTicks end_time = base::TimeTicks::Now(); | 935 base::TimeTicks end_time = base::TimeTicks::Now(); |
| 936 base::TimeDelta duration = end_time - begin_time; | 936 base::TimeDelta duration = end_time - begin_time; |
| 937 stats->totalRasterizeTime += duration; | 937 stats->totalRasterizeTime += duration; |
| 938 if (raster_task_metadata.is_tile_in_pending_tree_now_bin) |
| 939 stats->totalRasterizeTimeForNowBinsOnPendingTree += duration; |
| 940 |
| 938 UMA_HISTOGRAM_CUSTOM_COUNTS("Renderer4.PictureRasterTimeMS", | 941 UMA_HISTOGRAM_CUSTOM_COUNTS("Renderer4.PictureRasterTimeMS", |
| 939 duration.InMilliseconds(), | 942 duration.InMilliseconds(), |
| 940 0, | 943 0, |
| 941 10, | 944 10, |
| 942 10); | 945 10); |
| 943 | 946 |
| 944 if (use_cheapness_estimator) { | 947 if (use_cheapness_estimator) { |
| 945 bool is_predicted_cheap = picture_pile->IsCheapInRect (rect, contents_scal
e); | 948 bool is_predicted_cheap = picture_pile->IsCheapInRect (rect, contents_scal
e); |
| 946 bool is_actually_cheap = duration.InMillisecondsF() <= 1.0f; | 949 bool is_actually_cheap = duration.InMillisecondsF() <= 1.0f; |
| 947 RecordCheapnessPredictorResults(is_predicted_cheap, is_actually_cheap); | 950 RecordCheapnessPredictorResults(is_predicted_cheap, is_actually_cheap); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 970 decode_begin_time = base::TimeTicks::Now(); | 973 decode_begin_time = base::TimeTicks::Now(); |
| 971 pixel_ref->Decode(); | 974 pixel_ref->Decode(); |
| 972 if (stats) { | 975 if (stats) { |
| 973 stats->totalDeferredImageDecodeCount++; | 976 stats->totalDeferredImageDecodeCount++; |
| 974 stats->totalDeferredImageDecodeTime += | 977 stats->totalDeferredImageDecodeTime += |
| 975 base::TimeTicks::Now() - decode_begin_time; | 978 base::TimeTicks::Now() - decode_begin_time; |
| 976 } | 979 } |
| 977 } | 980 } |
| 978 | 981 |
| 979 } // namespace cc | 982 } // namespace cc |
| OLD | NEW |