OLD | NEW |
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 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1456 // Suppress updating when we are hidden. | 1456 // Suppress updating when we are hidden. |
1457 if (is_hidden_ || size_.IsEmpty() || is_swapped_out_) { | 1457 if (is_hidden_ || size_.IsEmpty() || is_swapped_out_) { |
1458 paint_aggregator_.ClearPendingUpdate(); | 1458 paint_aggregator_.ClearPendingUpdate(); |
1459 needs_repainting_on_restore_ = true; | 1459 needs_repainting_on_restore_ = true; |
1460 TRACE_EVENT0("renderer", "EarlyOut_NotVisible"); | 1460 TRACE_EVENT0("renderer", "EarlyOut_NotVisible"); |
1461 return; | 1461 return; |
1462 } | 1462 } |
1463 | 1463 |
1464 // Tracking of frame rate jitter | 1464 // Tracking of frame rate jitter |
1465 base::TimeTicks frame_begin_ticks = gfx::FrameTime::Now(); | 1465 base::TimeTicks frame_begin_ticks = gfx::FrameTime::Now(); |
1466 InstrumentWillBeginFrame(); | 1466 InstrumentWillBeginFrame(0); |
1467 AnimateIfNeeded(); | 1467 AnimateIfNeeded(); |
1468 | 1468 |
1469 // Layout may generate more invalidation. It may also enable the | 1469 // Layout may generate more invalidation. It may also enable the |
1470 // GPU acceleration, so make sure to run layout before we send the | 1470 // GPU acceleration, so make sure to run layout before we send the |
1471 // GpuRenderingActivated message. | 1471 // GpuRenderingActivated message. |
1472 webwidget_->layout(); | 1472 webwidget_->layout(); |
1473 | 1473 |
1474 // Check for whether we need to track swap buffers. We need to do that after | 1474 // Check for whether we need to track swap buffers. We need to do that after |
1475 // layout() because it may have switched us to accelerated compositing. | 1475 // layout() because it may have switched us to accelerated compositing. |
1476 if (is_accelerated_compositing_active_) | 1476 if (is_accelerated_compositing_active_) |
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2835 GetURLForGraphicsContext3D(), | 2835 GetURLForGraphicsContext3D(), |
2836 gpu_channel_host.get(), | 2836 gpu_channel_host.get(), |
2837 use_echo_for_swap_ack, | 2837 use_echo_for_swap_ack, |
2838 attributes, | 2838 attributes, |
2839 false /* bind generates resources */, | 2839 false /* bind generates resources */, |
2840 limits)); | 2840 limits)); |
2841 return context.Pass(); | 2841 return context.Pass(); |
2842 } | 2842 } |
2843 | 2843 |
2844 } // namespace content | 2844 } // namespace content |
OLD | NEW |