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

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

Issue 2444563002: cc: Remove "SwapBuffers" naming from LayerTreeHostSingleThreadClient (Closed)
Patch Set: swapsinglethread: fix-name-in-browsertest Created 4 years, 2 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 | « content/renderer/render_widget.h ('k') | content/renderer/render_widget_browsertest.cc » ('j') | 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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 void RenderWidget::DidCommitCompositorFrame() { 775 void RenderWidget::DidCommitCompositorFrame() {
776 for (auto& observer : render_frames_) 776 for (auto& observer : render_frames_)
777 observer.DidCommitCompositorFrame(); 777 observer.DidCommitCompositorFrame();
778 for (auto& observer : render_frame_proxies_) 778 for (auto& observer : render_frame_proxies_)
779 observer.DidCommitCompositorFrame(); 779 observer.DidCommitCompositorFrame();
780 input_handler_->FlushPendingInputEventAck(); 780 input_handler_->FlushPendingInputEventAck();
781 } 781 }
782 782
783 void RenderWidget::DidCompletePageScaleAnimation() {} 783 void RenderWidget::DidCompletePageScaleAnimation() {}
784 784
785 void RenderWidget::DidCompleteSwapBuffers() { 785 void RenderWidget::DidReceiveCompositorFrameAck() {
786 TRACE_EVENT0("renderer", "RenderWidget::DidCompleteSwapBuffers"); 786 TRACE_EVENT0("renderer", "RenderWidget::DidReceiveCompositorFrameAck");
787 787
788 // Notify subclasses threaded composited rendering was flushed to the screen. 788 // Notify subclasses threaded composited rendering was flushed to the screen.
789 DidFlushPaint(); 789 DidFlushPaint();
790 790
791 if (!next_paint_flags_ && !need_update_rect_for_auto_resize_) { 791 if (!next_paint_flags_ && !need_update_rect_for_auto_resize_) {
792 return; 792 return;
793 } 793 }
794 794
795 ViewHostMsg_UpdateRect_Params params; 795 ViewHostMsg_UpdateRect_Params params;
796 params.view_size = size_; 796 params.view_size = size_;
797 params.flags = next_paint_flags_; 797 params.flags = next_paint_flags_;
798 798
799 Send(new ViewHostMsg_UpdateRect(routing_id_, params)); 799 Send(new ViewHostMsg_UpdateRect(routing_id_, params));
800 next_paint_flags_ = 0; 800 next_paint_flags_ = 0;
801 need_update_rect_for_auto_resize_ = false; 801 need_update_rect_for_auto_resize_ = false;
802 } 802 }
803 803
804 void RenderWidget::ForwardCompositorProto(const std::vector<uint8_t>& proto) { 804 void RenderWidget::ForwardCompositorProto(const std::vector<uint8_t>& proto) {
805 Send(new ViewHostMsg_ForwardCompositorProto(routing_id_, proto)); 805 Send(new ViewHostMsg_ForwardCompositorProto(routing_id_, proto));
806 } 806 }
807 807
808 bool RenderWidget::IsClosing() const { 808 bool RenderWidget::IsClosing() const {
809 return host_closing_; 809 return host_closing_;
810 } 810 }
811 811
812 void RenderWidget::OnSwapBuffersAborted() {
813 TRACE_EVENT0("renderer", "RenderWidget::OnSwapBuffersAborted");
814 // Schedule another frame so the compositor learns about it.
815 ScheduleComposite();
816 }
817
818 void RenderWidget::OnSwapBuffersComplete() {
819 TRACE_EVENT0("renderer", "RenderWidget::OnSwapBuffersComplete");
820
821 // Notify subclasses that composited rendering was flushed to the screen.
822 DidFlushPaint();
823 }
824
825 void RenderWidget::OnSwapBuffersPosted() {
826 TRACE_EVENT0("renderer", "RenderWidget::OnSwapBuffersPosted");
827 }
828
829 void RenderWidget::RequestScheduleAnimation() { 812 void RenderWidget::RequestScheduleAnimation() {
830 scheduleAnimation(); 813 scheduleAnimation();
831 } 814 }
832 815
833 void RenderWidget::UpdateVisualState() { 816 void RenderWidget::UpdateVisualState() {
834 GetWebWidget()->updateAllLifecyclePhases(); 817 GetWebWidget()->updateAllLifecyclePhases();
835 } 818 }
836 819
837 void RenderWidget::WillBeginCompositorFrame() { 820 void RenderWidget::WillBeginCompositorFrame() {
838 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); 821 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame");
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
2178 bool RenderWidget::isPointerLocked() { 2161 bool RenderWidget::isPointerLocked() {
2179 return mouse_lock_dispatcher_->IsMouseLockedTo( 2162 return mouse_lock_dispatcher_->IsMouseLockedTo(
2180 webwidget_mouse_lock_target_.get()); 2163 webwidget_mouse_lock_target_.get());
2181 } 2164 }
2182 2165
2183 blink::WebWidget* RenderWidget::GetWebWidget() const { 2166 blink::WebWidget* RenderWidget::GetWebWidget() const {
2184 return webwidget_internal_; 2167 return webwidget_internal_;
2185 } 2168 }
2186 2169
2187 } // namespace content 2170 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/renderer/render_widget_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698