summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-24 14:59:27 +0000
committerjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-24 14:59:27 +0000
commit213fcfcf37c64ea18ebe2adc82a05c469a479d39 (patch)
treed0fe60ecb8fb597cedba3a8c6c7ae0d160df6ed5
parenta096e89e7ff6fbc80294e2ee831c8a1ff1c0a7e5 (diff)
downloadchromium_src-213fcfcf37c64ea18ebe2adc82a05c469a479d39.zip
chromium_src-213fcfcf37c64ea18ebe2adc82a05c469a479d39.tar.gz
chromium_src-213fcfcf37c64ea18ebe2adc82a05c469a479d39.tar.bz2
Add UMA histogram for compositor frame delay with software compositor.
Software and hardware behave differently and should be split out separately. BUG=277935 Review URL: https://chromiumcodereview.appspot.com/23295031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219445 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--cc/debug/frame_rate_counter.cc21
-rw-r--r--cc/debug/frame_rate_counter.h2
-rw-r--r--cc/trees/layer_tree_host_impl.cc3
-rw-r--r--tools/metrics/histograms/histograms.xml9
4 files changed, 27 insertions, 8 deletions
diff --git a/cc/debug/frame_rate_counter.cc b/cc/debug/frame_rate_counter.cc
index 8a829ff..11632b1 100644
--- a/cc/debug/frame_rate_counter.cc
+++ b/cc/debug/frame_rate_counter.cc
@@ -44,7 +44,7 @@ base::TimeDelta FrameRateCounter::RecentFrameInterval(size_t n) const {
FrameRateCounter::FrameRateCounter(bool has_impl_thread)
: has_impl_thread_(has_impl_thread), dropped_frame_count_(0) {}
-void FrameRateCounter::SaveTimeStamp(base::TimeTicks timestamp) {
+void FrameRateCounter::SaveTimeStamp(base::TimeTicks timestamp, bool software) {
ring_buffer_.SaveToBuffer(timestamp);
// Check if frame interval can be computed.
@@ -55,11 +55,20 @@ void FrameRateCounter::SaveTimeStamp(base::TimeTicks timestamp) {
RecentFrameInterval(ring_buffer_.BufferSize() - 1);
if (has_impl_thread_ && ring_buffer_.CurrentIndex() > 0) {
- UMA_HISTOGRAM_CUSTOM_COUNTS("Renderer4.CompositorThreadImplDrawDelay",
- frame_interval_seconds.InMilliseconds(),
- 1,
- 120,
- 60);
+ if (software) {
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Renderer4.SoftwareCompositorThreadImplDrawDelay",
+ frame_interval_seconds.InMilliseconds(),
+ 1,
+ 120,
+ 60);
+ } else {
+ UMA_HISTOGRAM_CUSTOM_COUNTS("Renderer4.CompositorThreadImplDrawDelay",
+ frame_interval_seconds.InMilliseconds(),
+ 1,
+ 120,
+ 60);
+ }
}
if (!IsBadFrameInterval(frame_interval_seconds) &&
diff --git a/cc/debug/frame_rate_counter.h b/cc/debug/frame_rate_counter.h
index 32b4c2c..0b69b29 100644
--- a/cc/debug/frame_rate_counter.h
+++ b/cc/debug/frame_rate_counter.h
@@ -22,7 +22,7 @@ class FrameRateCounter {
int dropped_frame_count() const { return dropped_frame_count_; }
size_t time_stamp_history_size() const { return ring_buffer_.BufferSize(); }
- void SaveTimeStamp(base::TimeTicks timestamp);
+ void SaveTimeStamp(base::TimeTicks timestamp, bool software);
// n = 0 returns the oldest frame interval retained in the history, while n =
// time_stamp_history_size() - 1 returns the most recent frame interval.
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 0cfc842..85f1a22 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1240,7 +1240,8 @@ void LayerTreeHostImpl::DrawLayers(FrameData* frame,
DCHECK(!frame->render_passes.empty());
int old_dropped_frame_count = fps_counter_->dropped_frame_count();
- fps_counter_->SaveTimeStamp(frame_begin_time);
+ fps_counter_->SaveTimeStamp(frame_begin_time,
+ !output_surface_->context_provider());
bool on_main_thread = false;
rendering_stats_instrumentation_->IncrementScreenFrameCount(
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index 7485b53..7abdedd 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -12853,6 +12853,15 @@ other types of suffix sets.
<summary>Time to capture a renderer snapshot.</summary>
</histogram>
+<histogram name="Renderer4.SoftwareCompositorThreadImplDrawDelay"
+ units="milliseconds">
+ <summary>
+ Time between frames when the software renderer is being used, as measured on
+ the compositor thread. This is collected once per frame while it is being
+ drawn to the screen in the compositor.
+ </summary>
+</histogram>
+
<histogram name="Renderer4.SoftwareDoDeferredUpdateDelay">
<summary>Time between frames when the page is not GPU accelerated.</summary>
</histogram>