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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 397443002: [not for review] Add Draw entries to window Performance Timeline Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git pull of third_party/WebKit Created 6 years, 5 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 void RenderWidgetCompositor::Layout() { 759 void RenderWidgetCompositor::Layout() {
760 widget_->webwidget()->layout(); 760 widget_->webwidget()->layout();
761 } 761 }
762 762
763 void RenderWidgetCompositor::ApplyScrollAndScale( 763 void RenderWidgetCompositor::ApplyScrollAndScale(
764 const gfx::Vector2d& scroll_delta, 764 const gfx::Vector2d& scroll_delta,
765 float page_scale) { 765 float page_scale) {
766 widget_->webwidget()->applyScrollAndScale(scroll_delta, page_scale); 766 widget_->webwidget()->applyScrollAndScale(scroll_delta, page_scale);
767 } 767 }
768 768
769 static std::pair<int, double> TickToDouble(
770 const std::pair<int, const base::TimeTicks> &tick)
771 {
772 return std::make_pair(tick.first,
773 (tick.second - base::TimeTicks()).InSecondsF());
774 }
775
776 void RenderWidgetCompositor::RecordDrawTiming(
777 int64_t rect_id,
778 const std::vector<std::pair<int, base::TimeTicks> > &draws) {
enne (OOO) 2014/07/22 20:44:26 style nit: ">& draws" not "> &draws" Can you git
Mike B 2014/07/25 23:09:41 Done.
779 std::vector<std::pair<int, double> > drawTiming(draws.size());
780 std::transform(draws.begin(), draws.end(), drawTiming.begin(), TickToDouble);
781 widget_->webwidget()->recordDrawTiming(rect_id, drawTiming);
782 //widget_->webwidget()->applyScrollAndScale(scroll_delta, page_scale);
enne (OOO) 2014/07/22 20:44:26 ?
Mike B 2014/07/25 23:09:41 Done.
783 }
784
769 scoped_ptr<cc::OutputSurface> RenderWidgetCompositor::CreateOutputSurface( 785 scoped_ptr<cc::OutputSurface> RenderWidgetCompositor::CreateOutputSurface(
770 bool fallback) { 786 bool fallback) {
771 return widget_->CreateOutputSurface(fallback); 787 return widget_->CreateOutputSurface(fallback);
772 } 788 }
773 789
774 void RenderWidgetCompositor::DidInitializeOutputSurface() { 790 void RenderWidgetCompositor::DidInitializeOutputSurface() {
775 } 791 }
776 792
777 void RenderWidgetCompositor::WillCommit() { 793 void RenderWidgetCompositor::WillCommit() {
778 widget_->InstrumentWillComposite(); 794 widget_->InstrumentWillComposite();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 widget_->OnSwapBuffersAborted(); 826 widget_->OnSwapBuffersAborted();
811 } 827 }
812 828
813 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { 829 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() {
814 cc::ContextProvider* provider = 830 cc::ContextProvider* provider =
815 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); 831 RenderThreadImpl::current()->SharedMainThreadContextProvider().get();
816 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 832 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
817 } 833 }
818 834
819 } // namespace content 835 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698