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

Unified Diff: cc/single_thread_proxy.cc

Issue 11198005: NOT READY FOR REVIEW - switch to a subscriber model for rendering stats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing file. Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/single_thread_proxy.h ('k') | cc/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/single_thread_proxy.cc
diff --git a/cc/single_thread_proxy.cc b/cc/single_thread_proxy.cc
index 6c63c3d9d4e5a4153d412ceb808eb216ce5292d0..93a26f2279ed7bd4225b4c8598da4d3faa2f1945 100644
--- a/cc/single_thread_proxy.cc
+++ b/cc/single_thread_proxy.cc
@@ -6,6 +6,10 @@
#include "cc/single_thread_proxy.h"
+#include "cc/rendering_stats_subscriber.h"
+#include <wtf/CurrentTime.h>
+
+using namespace WTF;
#include "base/debug/trace_event.h"
#include "cc/draw_quad.h"
#include "cc/graphics_context.h"
@@ -154,6 +158,20 @@ void SingleThreadProxy::renderingStats(RenderingStats* stats)
m_layerTreeHostImpl->renderingStats(stats);
}
+void SingleThreadProxy::startRecordingRenderingStats()
+{
+ // This subscriber will collect total commit time and total commit count.
+ m_renderingStatsSubscriber = RenderingStatsSubscriber::create();
+ m_layerTreeHostImpl->startRecordingRenderingStats();
+}
+
+void SingleThreadProxy::stopRecordingRenderingStats(RenderingStats* stats)
+{
+ // TODO(vollick): populate stats based on the subscriber here.
+ m_renderingStatsSubscriber.reset();
+ m_layerTreeHostImpl->stopRecordingRenderingStats(stats);
+}
+
const RendererCapabilities& SingleThreadProxy::rendererCapabilities() const
{
DCHECK(m_rendererInitialized);
« no previous file with comments | « cc/single_thread_proxy.h ('k') | cc/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698