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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 905 | 905 |
| 906 // Notify subclasses that we initiated the paint operation. | 906 // Notify subclasses that we initiated the paint operation. |
| 907 DidInitiatePaint(); | 907 DidInitiatePaint(); |
| 908 } | 908 } |
| 909 | 909 |
| 910 void RenderWidget::DidCommitCompositorFrame() { | 910 void RenderWidget::DidCommitCompositorFrame() { |
| 911 for (auto& observer : render_frames_) | 911 for (auto& observer : render_frames_) |
| 912 observer.DidCommitCompositorFrame(); | 912 observer.DidCommitCompositorFrame(); |
| 913 for (auto& observer : render_frame_proxies_) | 913 for (auto& observer : render_frame_proxies_) |
| 914 observer.DidCommitCompositorFrame(); | 914 observer.DidCommitCompositorFrame(); |
| 915 | |
| 916 GetWebWidget()->setSuppressFrameRequestsWorkaroundFor704763Only(false); | |
|
esprehn
2017/04/04 06:13:55
I think should be in RenderWidget::UpdateVisualSta
alancutter (OOO until 2018)
2017/04/04 09:54:31
Fair call, moving the unset back to suggested plac
| |
| 915 } | 917 } |
| 916 | 918 |
| 917 void RenderWidget::DidCompletePageScaleAnimation() {} | 919 void RenderWidget::DidCompletePageScaleAnimation() {} |
| 918 | 920 |
| 919 void RenderWidget::DidReceiveCompositorFrameAck() { | 921 void RenderWidget::DidReceiveCompositorFrameAck() { |
| 920 TRACE_EVENT0("renderer", "RenderWidget::DidReceiveCompositorFrameAck"); | 922 TRACE_EVENT0("renderer", "RenderWidget::DidReceiveCompositorFrameAck"); |
| 921 | 923 |
| 922 if (!next_paint_flags_ && !need_update_rect_for_auto_resize_) { | 924 if (!next_paint_flags_ && !need_update_rect_for_auto_resize_) { |
| 923 return; | 925 return; |
| 924 } | 926 } |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 952 | 954 |
| 953 time_to_first_active_paint_recorded_ = true; | 955 time_to_first_active_paint_recorded_ = true; |
| 954 base::TimeDelta sample = base::TimeTicks::Now() - was_shown_time_; | 956 base::TimeDelta sample = base::TimeTicks::Now() - was_shown_time_; |
| 955 UMA_HISTOGRAM_TIMES("PurgeAndSuspend.Experimental.TimeToFirstActivePaint", | 957 UMA_HISTOGRAM_TIMES("PurgeAndSuspend.Experimental.TimeToFirstActivePaint", |
| 956 sample); | 958 sample); |
| 957 } | 959 } |
| 958 | 960 |
| 959 void RenderWidget::WillBeginCompositorFrame() { | 961 void RenderWidget::WillBeginCompositorFrame() { |
| 960 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); | 962 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); |
| 961 | 963 |
| 964 GetWebWidget()->setSuppressFrameRequestsWorkaroundFor704763Only(true); | |
| 965 | |
| 962 // The UpdateTextInputState can result in further layout and possibly | 966 // The UpdateTextInputState can result in further layout and possibly |
| 963 // enable GPU acceleration so they need to be called before any painting | 967 // enable GPU acceleration so they need to be called before any painting |
| 964 // is done. | 968 // is done. |
| 965 UpdateTextInputState(); | 969 UpdateTextInputState(); |
| 966 UpdateSelectionBounds(); | 970 UpdateSelectionBounds(); |
| 967 | 971 |
| 968 for (auto& observer : render_frame_proxies_) | 972 for (auto& observer : render_frame_proxies_) |
| 969 observer.WillBeginCompositorFrame(); | 973 observer.WillBeginCompositorFrame(); |
| 970 } | 974 } |
| 971 | 975 |
| (...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2338 // browser side (https://crbug.com/669219). | 2342 // browser side (https://crbug.com/669219). |
| 2339 // If there is no WebFrameWidget, then there will be no | 2343 // If there is no WebFrameWidget, then there will be no |
| 2340 // InputMethodControllers for a WebLocalFrame. | 2344 // InputMethodControllers for a WebLocalFrame. |
| 2341 return nullptr; | 2345 return nullptr; |
| 2342 } | 2346 } |
| 2343 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2347 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
| 2344 ->getActiveWebInputMethodController(); | 2348 ->getActiveWebInputMethodController(); |
| 2345 } | 2349 } |
| 2346 | 2350 |
| 2347 } // namespace content | 2351 } // namespace content |
| OLD | NEW |