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

Side by Side Diff: cc/layer_tree_host.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/layer_tree_host_impl.h » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/rendering_stats_subscriber.h"
7 #include "cc/layer_tree_host.h" 8 #include "cc/layer_tree_host.h"
8 9
9 #include "Region.h" 10 #include "Region.h"
10 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
11 #include "base/message_loop.h" 12 #include "base/message_loop.h"
12 #include "cc/font_atlas.h" 13 #include "cc/font_atlas.h"
13 #include "cc/graphics_context.h" 14 #include "cc/graphics_context.h"
14 #include "cc/heads_up_display_layer.h" 15 #include "cc/heads_up_display_layer.h"
15 #include "cc/heads_up_display_layer_impl.h" 16 #include "cc/heads_up_display_layer_impl.h"
16 #include "cc/layer.h" 17 #include "cc/layer.h"
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 754
754 void LayerTreeHost::stopRateLimiter(WebKit::WebGraphicsContext3D* context) 755 void LayerTreeHost::stopRateLimiter(WebKit::WebGraphicsContext3D* context)
755 { 756 {
756 RateLimiterMap::iterator it = m_rateLimiters.find(context); 757 RateLimiterMap::iterator it = m_rateLimiters.find(context);
757 if (it != m_rateLimiters.end()) { 758 if (it != m_rateLimiters.end()) {
758 it->second->stop(); 759 it->second->stop();
759 m_rateLimiters.erase(it); 760 m_rateLimiters.erase(it);
760 } 761 }
761 } 762 }
762 763
764 void LayerTreeHost::startRecordingRenderingStats()
765 {
766 m_renderingStatsSubscriber = RenderingStatsSubscriber::create();
767 m_proxy->startRecordingRenderingStats();
768 }
769
770 void LayerTreeHost::stopRecordingRenderingStats(RenderingStats* stats)
771 {
772 // TODO(vollick): populate the stats here.
773 m_renderingStatsSubscriber.reset();
774 m_proxy->stopRecordingRenderingStats(stats);
775 }
776
763 void LayerTreeHost::rateLimit() 777 void LayerTreeHost::rateLimit()
764 { 778 {
765 // Force a no-op command on the compositor context, so that any ratelimiting commands will wait for the compositing 779 // Force a no-op command on the compositor context, so that any ratelimiting commands will wait for the compositing
766 // context, and therefore for the SwapBuffers. 780 // context, and therefore for the SwapBuffers.
767 m_proxy->forceSerializeOnSwapBuffers(); 781 m_proxy->forceSerializeOnSwapBuffers();
768 } 782 }
769 783
770 bool LayerTreeHost::bufferedUpdates() 784 bool LayerTreeHost::bufferedUpdates()
771 { 785 {
772 return m_settings.maxPartialTextureUpdates != numeric_limits<size_t>::max(); 786 return m_settings.maxPartialTextureUpdates != numeric_limits<size_t>::max();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 else 847 else
834 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); 848 layer->notifyAnimationFinished(wallClockTime.ToDoubleT());
835 } 849 }
836 } 850 }
837 851
838 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 852 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
839 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 853 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
840 } 854 }
841 855
842 } // namespace cc 856 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698