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

Side by Side Diff: cc/tile_manager.cc

Issue 12209022: cc: add rasterize time to continuous painting graph data in impl-side-painting (Closed) Base URL: http://git.chromium.org/chromium/src.git@raster
Patch Set: Fixed style Created 7 years, 10 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
« no previous file with comments | « cc/ring_buffer.h ('k') | cc/worker_pool.cc » ('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/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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 int64 total_pixels_rasterized = 0; 943 int64 total_pixels_rasterized = 0;
944 picture_pile->Raster(&canvas, rect, contents_scale, 944 picture_pile->Raster(&canvas, rect, contents_scale,
945 &total_pixels_rasterized); 945 &total_pixels_rasterized);
946 946
947 if (stats) { 947 if (stats) {
948 stats->totalPixelsRasterized += total_pixels_rasterized; 948 stats->totalPixelsRasterized += total_pixels_rasterized;
949 949
950 base::TimeTicks end_time = base::TimeTicks::HighResNow(); 950 base::TimeTicks end_time = base::TimeTicks::HighResNow();
951 base::TimeDelta duration = end_time - begin_time; 951 base::TimeDelta duration = end_time - begin_time;
952 stats->totalRasterizeTime += duration; 952 stats->totalRasterizeTime += duration;
953 if (raster_task_metadata.is_tile_in_pending_tree_now_bin)
954 stats->totalRasterizeTimeForNowBinsOnPendingTree += duration;
955
953 UMA_HISTOGRAM_CUSTOM_COUNTS("Renderer4.PictureRasterTimeMS", 956 UMA_HISTOGRAM_CUSTOM_COUNTS("Renderer4.PictureRasterTimeMS",
954 duration.InMilliseconds(), 957 duration.InMilliseconds(),
955 0, 958 0,
956 10, 959 10,
957 10); 960 10);
958 961
959 if (use_cheapness_estimator) { 962 if (use_cheapness_estimator) {
960 bool is_predicted_cheap = picture_pile->IsCheapInRect (rect, contents_scal e); 963 bool is_predicted_cheap = picture_pile->IsCheapInRect (rect, contents_scal e);
961 bool is_actually_cheap = duration.InMillisecondsF() <= 1.0f; 964 bool is_actually_cheap = duration.InMillisecondsF() <= 1.0f;
962 RecordCheapnessPredictorResults(is_predicted_cheap, is_actually_cheap); 965 RecordCheapnessPredictorResults(is_predicted_cheap, is_actually_cheap);
(...skipping 22 matching lines...) Expand all
985 decode_begin_time = base::TimeTicks::HighResNow(); 988 decode_begin_time = base::TimeTicks::HighResNow();
986 pixel_ref->Decode(); 989 pixel_ref->Decode();
987 if (stats) { 990 if (stats) {
988 stats->totalDeferredImageDecodeCount++; 991 stats->totalDeferredImageDecodeCount++;
989 stats->totalDeferredImageDecodeTime += 992 stats->totalDeferredImageDecodeTime +=
990 base::TimeTicks::HighResNow() - decode_begin_time; 993 base::TimeTicks::HighResNow() - decode_begin_time;
991 } 994 }
992 } 995 }
993 996
994 } // namespace cc 997 } // namespace cc
OLDNEW
« no previous file with comments | « cc/ring_buffer.h ('k') | cc/worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698