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

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

Issue 27710005: cc: Use HighResNow as timebase if it is fast and reliable (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add missing include Created 7 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
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "third_party/WebKit/public/platform/WebString.h" 48 #include "third_party/WebKit/public/platform/WebString.h"
49 #include "third_party/WebKit/public/web/WebCursorInfo.h" 49 #include "third_party/WebKit/public/web/WebCursorInfo.h"
50 #include "third_party/WebKit/public/web/WebHelperPlugin.h" 50 #include "third_party/WebKit/public/web/WebHelperPlugin.h"
51 #include "third_party/WebKit/public/web/WebPagePopup.h" 51 #include "third_party/WebKit/public/web/WebPagePopup.h"
52 #include "third_party/WebKit/public/web/WebPopupMenu.h" 52 #include "third_party/WebKit/public/web/WebPopupMenu.h"
53 #include "third_party/WebKit/public/web/WebPopupMenuInfo.h" 53 #include "third_party/WebKit/public/web/WebPopupMenuInfo.h"
54 #include "third_party/WebKit/public/web/WebRange.h" 54 #include "third_party/WebKit/public/web/WebRange.h"
55 #include "third_party/WebKit/public/web/WebScreenInfo.h" 55 #include "third_party/WebKit/public/web/WebScreenInfo.h"
56 #include "third_party/skia/include/core/SkShader.h" 56 #include "third_party/skia/include/core/SkShader.h"
57 #include "ui/base/ui_base_switches.h" 57 #include "ui/base/ui_base_switches.h"
58 #include "ui/gfx/frame_time.h"
58 #include "ui/gfx/rect_conversions.h" 59 #include "ui/gfx/rect_conversions.h"
59 #include "ui/gfx/size_conversions.h" 60 #include "ui/gfx/size_conversions.h"
60 #include "ui/gfx/skia_util.h" 61 #include "ui/gfx/skia_util.h"
61 #include "ui/gl/gl_switches.h" 62 #include "ui/gl/gl_switches.h"
62 #include "ui/surface/transport_dib.h" 63 #include "ui/surface/transport_dib.h"
63 #include "webkit/renderer/compositor_bindings/web_rendering_stats_impl.h" 64 #include "webkit/renderer/compositor_bindings/web_rendering_stats_impl.h"
64 65
65 #if defined(OS_ANDROID) 66 #if defined(OS_ANDROID)
66 #include "base/android/sys_utils.h" 67 #include "base/android/sys_utils.h"
67 #include "content/renderer/android/synchronous_compositor_factory.h" 68 #include "content/renderer/android/synchronous_compositor_factory.h"
(...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 1405
1405 // Suppress updating when we are hidden. 1406 // Suppress updating when we are hidden.
1406 if (is_hidden_ || size_.IsEmpty() || is_swapped_out_) { 1407 if (is_hidden_ || size_.IsEmpty() || is_swapped_out_) {
1407 paint_aggregator_.ClearPendingUpdate(); 1408 paint_aggregator_.ClearPendingUpdate();
1408 needs_repainting_on_restore_ = true; 1409 needs_repainting_on_restore_ = true;
1409 TRACE_EVENT0("renderer", "EarlyOut_NotVisible"); 1410 TRACE_EVENT0("renderer", "EarlyOut_NotVisible");
1410 return; 1411 return;
1411 } 1412 }
1412 1413
1413 // Tracking of frame rate jitter 1414 // Tracking of frame rate jitter
1414 base::TimeTicks frame_begin_ticks = base::TimeTicks::Now(); 1415 base::TimeTicks frame_begin_ticks = gfx::FrameTime::Now();
1415 InstrumentWillBeginFrame(); 1416 InstrumentWillBeginFrame();
1416 AnimateIfNeeded(); 1417 AnimateIfNeeded();
1417 1418
1418 // Layout may generate more invalidation. It may also enable the 1419 // Layout may generate more invalidation. It may also enable the
1419 // GPU acceleration, so make sure to run layout before we send the 1420 // GPU acceleration, so make sure to run layout before we send the
1420 // GpuRenderingActivated message. 1421 // GpuRenderingActivated message.
1421 webwidget_->layout(); 1422 webwidget_->layout();
1422 1423
1423 // Check for whether we need to track swap buffers. We need to do that after 1424 // Check for whether we need to track swap buffers. We need to do that after
1424 // layout() because it may have switched us to accelerated compositing. 1425 // layout() because it may have switched us to accelerated compositing.
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
2784 kDefaultCommandBufferSize, 2785 kDefaultCommandBufferSize,
2785 kDefaultStartTransferBufferSize, 2786 kDefaultStartTransferBufferSize,
2786 kDefaultMinTransferBufferSize, 2787 kDefaultMinTransferBufferSize,
2787 kDefaultMaxTransferBufferSize, 2788 kDefaultMaxTransferBufferSize,
2788 mapped_memory_reclaim_limit)) 2789 mapped_memory_reclaim_limit))
2789 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); 2790 return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>();
2790 return context.Pass(); 2791 return context.Pass();
2791 } 2792 }
2792 2793
2793 } // namespace content 2794 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698