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

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

Issue 2267933002: Move text/selection update to the back of pipeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Even simpler blunt force. Created 4 years, 3 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 void RenderWidget::OnSwapBuffersPosted() { 798 void RenderWidget::OnSwapBuffersPosted() {
799 TRACE_EVENT0("renderer", "RenderWidget::OnSwapBuffersPosted"); 799 TRACE_EVENT0("renderer", "RenderWidget::OnSwapBuffersPosted");
800 } 800 }
801 801
802 void RenderWidget::RequestScheduleAnimation() { 802 void RenderWidget::RequestScheduleAnimation() {
803 scheduleAnimation(); 803 scheduleAnimation();
804 } 804 }
805 805
806 void RenderWidget::UpdateVisualState() { 806 void RenderWidget::UpdateVisualState() {
807 webwidget_->updateAllLifecyclePhases(); 807 webwidget_->updateAllLifecyclePhases();
808 UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME);
809 UpdateSelectionBounds();
808 } 810 }
809 811
810 void RenderWidget::WillBeginCompositorFrame() { 812 void RenderWidget::WillBeginCompositorFrame() {
811 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); 813 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame");
812 814
813 // The UpdateTextInputState can result in further layout and possibly
814 // enable GPU acceleration so they need to be called before any painting
815 // is done.
816 UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME);
817 UpdateSelectionBounds();
818
819 FOR_EACH_OBSERVER(RenderFrameProxy, render_frame_proxies_, 815 FOR_EACH_OBSERVER(RenderFrameProxy, render_frame_proxies_,
820 WillBeginCompositorFrame()); 816 WillBeginCompositorFrame());
821 } 817 }
822 818
823 std::unique_ptr<cc::SwapPromise> RenderWidget::RequestCopyOfOutputForLayoutTest( 819 std::unique_ptr<cc::SwapPromise> RenderWidget::RequestCopyOfOutputForLayoutTest(
824 std::unique_ptr<cc::CopyOutputRequest> request) { 820 std::unique_ptr<cc::CopyOutputRequest> request) {
825 return RenderThreadImpl::current()->RequestCopyOfOutputForLayoutTest( 821 return RenderThreadImpl::current()->RequestCopyOfOutputForLayoutTest(
826 routing_id_, std::move(request)); 822 routing_id_, std::move(request));
827 } 823 }
828 824
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
2066 void RenderWidget::requestPointerUnlock() { 2062 void RenderWidget::requestPointerUnlock() {
2067 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); 2063 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get());
2068 } 2064 }
2069 2065
2070 bool RenderWidget::isPointerLocked() { 2066 bool RenderWidget::isPointerLocked() {
2071 return mouse_lock_dispatcher_->IsMouseLockedTo( 2067 return mouse_lock_dispatcher_->IsMouseLockedTo(
2072 webwidget_mouse_lock_target_.get()); 2068 webwidget_mouse_lock_target_.get());
2073 } 2069 }
2074 2070
2075 } // namespace content 2071 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698