| 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/debug/trace_event_synthetic_delay.h" | 10 #include "base/debug/trace_event_synthetic_delay.h" |
| (...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1872 } | 1872 } |
| 1873 | 1873 |
| 1874 void RenderWidget::suppressCompositorScheduling(bool enable) { | 1874 void RenderWidget::suppressCompositorScheduling(bool enable) { |
| 1875 if (compositor_) | 1875 if (compositor_) |
| 1876 compositor_->SetSuppressScheduleComposite(enable); | 1876 compositor_->SetSuppressScheduleComposite(enable); |
| 1877 } | 1877 } |
| 1878 | 1878 |
| 1879 void RenderWidget::willBeginCompositorFrame() { | 1879 void RenderWidget::willBeginCompositorFrame() { |
| 1880 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); | 1880 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); |
| 1881 | 1881 |
| 1882 DCHECK(RenderThreadImpl::current()->compositor_message_loop_proxy().get()); | 1882 // TODO(enne): remove this when DoDeferredUpdate goes away. |
| 1883 if (!RenderThreadImpl::current()->compositor_message_loop_proxy().get()) |
| 1884 return; |
| 1883 | 1885 |
| 1884 // The following two can result in further layout and possibly | 1886 // The following two can result in further layout and possibly |
| 1885 // enable GPU acceleration so they need to be called before any painting | 1887 // enable GPU acceleration so they need to be called before any painting |
| 1886 // is done. | 1888 // is done. |
| 1887 UpdateTextInputType(); | 1889 UpdateTextInputType(); |
| 1888 #if defined(OS_ANDROID) | 1890 #if defined(OS_ANDROID) |
| 1889 UpdateTextInputState(false, true); | 1891 UpdateTextInputState(false, true); |
| 1890 #endif | 1892 #endif |
| 1891 UpdateSelectionBounds(); | 1893 UpdateSelectionBounds(); |
| 1892 } | 1894 } |
| (...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2786 | 2788 |
| 2787 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2789 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
| 2788 swapped_out_frames_.AddObserver(frame); | 2790 swapped_out_frames_.AddObserver(frame); |
| 2789 } | 2791 } |
| 2790 | 2792 |
| 2791 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2793 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
| 2792 swapped_out_frames_.RemoveObserver(frame); | 2794 swapped_out_frames_.RemoveObserver(frame); |
| 2793 } | 2795 } |
| 2794 | 2796 |
| 2795 } // namespace content | 2797 } // namespace content |
| OLD | NEW |