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

Side by Side Diff: content/renderer/render_widget.cc

Issue 12252058: Add a |scope| argument to TRACE_EVENT_INSTANT* and require its presence. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use flags to record scope 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 if (fractional_scale) { 1149 if (fractional_scale) {
1150 // Damage might not be DPI aligned. Inflate rect to compensate. 1150 // Damage might not be DPI aligned. Inflate rect to compensate.
1151 rect.Inset(-1, -1); 1151 rect.Inset(-1, -1);
1152 } 1152 }
1153 PaintRect(rect, pixel_bounds.origin(), canvas.get()); 1153 PaintRect(rect, pixel_bounds.origin(), canvas.get());
1154 } 1154 }
1155 1155
1156 // Software FPS tick for performance tests. The accelerated path traces the 1156 // Software FPS tick for performance tests. The accelerated path traces the
1157 // frame events in didCommitAndDrawCompositorFrame. See throughput_tests.cc. 1157 // frame events in didCommitAndDrawCompositorFrame. See throughput_tests.cc.
1158 // NOTE: Tests may break if this event is renamed or moved. 1158 // NOTE: Tests may break if this event is renamed or moved.
1159 UNSHIPPED_TRACE_EVENT_INSTANT0("test_fps", "TestFrameTickSW"); 1159 UNSHIPPED_TRACE_EVENT_INSTANT0("test_fps", "TestFrameTickSW",
1160 TRACE_EVENT_SCOPE_THREAD);
1160 } else { // Accelerated compositing path 1161 } else { // Accelerated compositing path
1161 // Begin painting. 1162 // Begin painting.
1162 // If painting is done via the gpu process then we don't set any damage 1163 // If painting is done via the gpu process then we don't set any damage
1163 // rects to save the browser process from doing unecessary work. 1164 // rects to save the browser process from doing unecessary work.
1164 pending_update_params_->bitmap_rect = bounds; 1165 pending_update_params_->bitmap_rect = bounds;
1165 pending_update_params_->scroll_rect = gfx::Rect(); 1166 pending_update_params_->scroll_rect = gfx::Rect();
1166 // We don't need an ack, because we're not sharing a DIB with the browser. 1167 // We don't need an ack, because we're not sharing a DIB with the browser.
1167 // If it needs to (e.g. composited UI), the GPU process does its own ACK 1168 // If it needs to (e.g. composited UI), the GPU process does its own ACK
1168 // with the browser for the GPU surface. 1169 // with the browser for the GPU surface.
1169 pending_update_params_->needs_ack = false; 1170 pending_update_params_->needs_ack = false;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 Send(pending_input_event_ack_.release()); 1371 Send(pending_input_event_ack_.release());
1371 } 1372 }
1372 1373
1373 void RenderWidget::DidCommitCompositorFrame() { 1374 void RenderWidget::DidCommitCompositorFrame() {
1374 } 1375 }
1375 1376
1376 void RenderWidget::didCommitAndDrawCompositorFrame() { 1377 void RenderWidget::didCommitAndDrawCompositorFrame() {
1377 TRACE_EVENT0("gpu", "RenderWidget::didCommitAndDrawCompositorFrame"); 1378 TRACE_EVENT0("gpu", "RenderWidget::didCommitAndDrawCompositorFrame");
1378 // Accelerated FPS tick for performance tests. See throughput_tests.cc. 1379 // Accelerated FPS tick for performance tests. See throughput_tests.cc.
1379 // NOTE: Tests may break if this event is renamed or moved. 1380 // NOTE: Tests may break if this event is renamed or moved.
1380 UNSHIPPED_TRACE_EVENT_INSTANT0("test_fps", "TestFrameTickGPU"); 1381 UNSHIPPED_TRACE_EVENT_INSTANT0("test_fps", "TestFrameTickGPU",
1382 TRACE_EVENT_SCOPE_THREAD);
1381 // Notify subclasses that we initiated the paint operation. 1383 // Notify subclasses that we initiated the paint operation.
1382 DidInitiatePaint(); 1384 DidInitiatePaint();
1383 } 1385 }
1384 1386
1385 void RenderWidget::didCompleteSwapBuffers() { 1387 void RenderWidget::didCompleteSwapBuffers() {
1386 TRACE_EVENT0("renderer", "RenderWidget::didCompleteSwapBuffers"); 1388 TRACE_EVENT0("renderer", "RenderWidget::didCompleteSwapBuffers");
1387 1389
1388 // Notify subclasses threaded composited rendering was flushed to the screen. 1390 // Notify subclasses threaded composited rendering was flushed to the screen.
1389 DidFlushPaint(); 1391 DidFlushPaint();
1390 1392
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 bool RenderWidget::WillHandleGestureEvent( 2129 bool RenderWidget::WillHandleGestureEvent(
2128 const WebKit::WebGestureEvent& event) { 2130 const WebKit::WebGestureEvent& event) {
2129 return false; 2131 return false;
2130 } 2132 }
2131 2133
2132 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { 2134 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const {
2133 return true; 2135 return true;
2134 } 2136 }
2135 2137
2136 } // namespace content 2138 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698