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

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

Issue 2162083005: Use surface copy requests for layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: piman comment Created 4 years, 4 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/layouttest_support.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"
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/feature_list.h" 13 #include "base/feature_list.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ptr_util.h" 16 #include "base/memory/ptr_util.h"
17 #include "base/memory/singleton.h" 17 #include "base/memory/singleton.h"
18 #include "base/message_loop/message_loop.h" 18 #include "base/message_loop/message_loop.h"
19 #include "base/metrics/histogram.h" 19 #include "base/metrics/histogram.h"
20 #include "base/stl_util.h" 20 #include "base/stl_util.h"
21 #include "base/strings/utf_string_conversions.h" 21 #include "base/strings/utf_string_conversions.h"
22 #include "base/sys_info.h" 22 #include "base/sys_info.h"
23 #include "base/trace_event/trace_event.h" 23 #include "base/trace_event/trace_event.h"
24 #include "base/trace_event/trace_event_synthetic_delay.h" 24 #include "base/trace_event/trace_event_synthetic_delay.h"
25 #include "build/build_config.h" 25 #include "build/build_config.h"
26 #include "cc/output/copy_output_request.h"
26 #include "cc/output/output_surface.h" 27 #include "cc/output/output_surface.h"
27 #include "cc/scheduler/begin_frame_source.h" 28 #include "cc/scheduler/begin_frame_source.h"
28 #include "components/scheduler/renderer/render_widget_scheduling_state.h" 29 #include "components/scheduler/renderer/render_widget_scheduling_state.h"
29 #include "components/scheduler/renderer/renderer_scheduler.h" 30 #include "components/scheduler/renderer/renderer_scheduler.h"
30 #include "content/common/content_switches_internal.h" 31 #include "content/common/content_switches_internal.h"
31 #include "content/common/input/synthetic_gesture_packet.h" 32 #include "content/common/input/synthetic_gesture_packet.h"
32 #include "content/common/input/web_input_event_traits.h" 33 #include "content/common/input/web_input_event_traits.h"
33 #include "content/common/input_messages.h" 34 #include "content/common/input_messages.h"
34 #include "content/common/swapped_out_messages.h" 35 #include "content/common/swapped_out_messages.h"
35 #include "content/common/text_input_state.h" 36 #include "content/common/text_input_state.h"
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 // The UpdateTextInputState can result in further layout and possibly 811 // The UpdateTextInputState can result in further layout and possibly
811 // enable GPU acceleration so they need to be called before any painting 812 // enable GPU acceleration so they need to be called before any painting
812 // is done. 813 // is done.
813 UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME); 814 UpdateTextInputState(ShowIme::HIDE_IME, ChangeSource::FROM_NON_IME);
814 UpdateSelectionBounds(); 815 UpdateSelectionBounds();
815 816
816 FOR_EACH_OBSERVER(RenderFrameProxy, render_frame_proxies_, 817 FOR_EACH_OBSERVER(RenderFrameProxy, render_frame_proxies_,
817 WillBeginCompositorFrame()); 818 WillBeginCompositorFrame());
818 } 819 }
819 820
821 std::unique_ptr<cc::SwapPromise> RenderWidget::RequestCopyOfOutputForLayoutTest(
822 std::unique_ptr<cc::CopyOutputRequest> request) {
823 return RenderThreadImpl::current()->RequestCopyOfOutputForLayoutTest(
824 routing_id_, std::move(request));
825 }
826
820 /////////////////////////////////////////////////////////////////////////////// 827 ///////////////////////////////////////////////////////////////////////////////
821 // RenderWidgetInputHandlerDelegate 828 // RenderWidgetInputHandlerDelegate
822 829
823 void RenderWidget::FocusChangeComplete() { 830 void RenderWidget::FocusChangeComplete() {
824 if (owner_delegate_) 831 if (owner_delegate_)
825 owner_delegate_->RenderWidgetFocusChangeComplete(); 832 owner_delegate_->RenderWidgetFocusChangeComplete();
826 } 833 }
827 834
828 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { 835 bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const {
829 if (owner_delegate_) 836 if (owner_delegate_)
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 void RenderWidget::requestPointerUnlock() { 2047 void RenderWidget::requestPointerUnlock() {
2041 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); 2048 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get());
2042 } 2049 }
2043 2050
2044 bool RenderWidget::isPointerLocked() { 2051 bool RenderWidget::isPointerLocked() {
2045 return mouse_lock_dispatcher_->IsMouseLockedTo( 2052 return mouse_lock_dispatcher_->IsMouseLockedTo(
2046 webwidget_mouse_lock_target_.get()); 2053 webwidget_mouse_lock_target_.get());
2047 } 2054 }
2048 2055
2049 } // namespace content 2056 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698