Chromium Code Reviews| 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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 963 } | 963 } |
| 964 | 964 |
| 965 // Suppress updating when we are hidden. | 965 // Suppress updating when we are hidden. |
| 966 if (is_hidden_ || size_.IsEmpty()) { | 966 if (is_hidden_ || size_.IsEmpty()) { |
| 967 paint_aggregator_.ClearPendingUpdate(); | 967 paint_aggregator_.ClearPendingUpdate(); |
| 968 needs_repainting_on_restore_ = true; | 968 needs_repainting_on_restore_ = true; |
| 969 TRACE_EVENT0("renderer", "EarlyOut_NotVisible"); | 969 TRACE_EVENT0("renderer", "EarlyOut_NotVisible"); |
| 970 return; | 970 return; |
| 971 } | 971 } |
| 972 | 972 |
| 973 if (is_swapped_out_) | |
|
Charlie Reis
2013/01/09 00:49:23
Or just move this up into the is_hidden_ check abo
| |
| 974 return; | |
| 975 | |
| 973 if (is_accelerated_compositing_active_) | 976 if (is_accelerated_compositing_active_) |
| 974 using_asynchronous_swapbuffers_ = SupportsAsynchronousSwapBuffers(); | 977 using_asynchronous_swapbuffers_ = SupportsAsynchronousSwapBuffers(); |
| 975 | 978 |
| 976 // Tracking of frame rate jitter | 979 // Tracking of frame rate jitter |
| 977 base::TimeTicks frame_begin_ticks = base::TimeTicks::Now(); | 980 base::TimeTicks frame_begin_ticks = base::TimeTicks::Now(); |
| 978 webwidget_->instrumentBeginFrame(); | 981 webwidget_->instrumentBeginFrame(); |
| 979 AnimateIfNeeded(); | 982 AnimateIfNeeded(); |
| 980 | 983 |
| 981 // Layout may generate more invalidation. It may also enable the | 984 // Layout may generate more invalidation. It may also enable the |
| 982 // GPU acceleration, so make sure to run layout before we send the | 985 // GPU acceleration, so make sure to run layout before we send the |
| (...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2042 | 2045 |
| 2043 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 2046 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
| 2044 return false; | 2047 return false; |
| 2045 } | 2048 } |
| 2046 | 2049 |
| 2047 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { | 2050 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { |
| 2048 return true; | 2051 return true; |
| 2049 } | 2052 } |
| 2050 | 2053 |
| 2051 } // namespace content | 2054 } // namespace content |
| OLD | NEW |