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

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

Issue 2299003002: Remove uses of external begin frame sources (Closed)
Patch Set: Remove Blimp conditional 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 | « content/renderer/render_widget.h ('k') | content/test/fake_compositor_dependencies.h » ('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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 bool fallback) { 741 bool fallback) {
742 DCHECK(webwidget_); 742 DCHECK(webwidget_);
743 // For widgets that are never visible, we don't start the compositor, so we 743 // For widgets that are never visible, we don't start the compositor, so we
744 // never get a request for a cc::OutputSurface. 744 // never get a request for a cc::OutputSurface.
745 DCHECK(!compositor_never_visible_); 745 DCHECK(!compositor_never_visible_);
746 return RenderThreadImpl::current()->CreateCompositorOutputSurface( 746 return RenderThreadImpl::current()->CreateCompositorOutputSurface(
747 fallback, routing_id_, frame_swap_message_queue_, 747 fallback, routing_id_, frame_swap_message_queue_,
748 GetURLForGraphicsContext3D()); 748 GetURLForGraphicsContext3D());
749 } 749 }
750 750
751 std::unique_ptr<cc::BeginFrameSource>
752 RenderWidget::CreateExternalBeginFrameSource() {
753 return compositor_deps_->CreateExternalBeginFrameSource(routing_id_);
754 }
755
756 void RenderWidget::DidCommitAndDrawCompositorFrame() { 751 void RenderWidget::DidCommitAndDrawCompositorFrame() {
757 // NOTE: Tests may break if this event is renamed or moved. See 752 // NOTE: Tests may break if this event is renamed or moved. See
758 // tab_capture_performancetest.cc. 753 // tab_capture_performancetest.cc.
759 TRACE_EVENT0("gpu", "RenderWidget::DidCommitAndDrawCompositorFrame"); 754 TRACE_EVENT0("gpu", "RenderWidget::DidCommitAndDrawCompositorFrame");
760 755
761 FOR_EACH_OBSERVER(RenderFrameImpl, render_frames_, 756 FOR_EACH_OBSERVER(RenderFrameImpl, render_frames_,
762 DidCommitAndDrawCompositorFrame()); 757 DidCommitAndDrawCompositorFrame());
763 758
764 // Notify subclasses that we initiated the paint operation. 759 // Notify subclasses that we initiated the paint operation.
765 DidInitiatePaint(); 760 DidInitiatePaint();
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2115 void RenderWidget::requestPointerUnlock() { 2110 void RenderWidget::requestPointerUnlock() {
2116 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); 2111 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get());
2117 } 2112 }
2118 2113
2119 bool RenderWidget::isPointerLocked() { 2114 bool RenderWidget::isPointerLocked() {
2120 return mouse_lock_dispatcher_->IsMouseLockedTo( 2115 return mouse_lock_dispatcher_->IsMouseLockedTo(
2121 webwidget_mouse_lock_target_.get()); 2116 webwidget_mouse_lock_target_.get());
2122 } 2117 }
2123 2118
2124 } // namespace content 2119 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/test/fake_compositor_dependencies.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698