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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 1905863002: Revert of Introduce components/display_compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
15 #include "base/memory/shared_memory.h" 15 #include "base/memory/shared_memory.h"
16 #include "base/message_loop/message_loop.h" 16 #include "base/message_loop/message_loop.h"
17 #include "base/run_loop.h" 17 #include "base/run_loop.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "base/test/simple_test_tick_clock.h" 19 #include "base/test/simple_test_tick_clock.h"
20 #include "build/build_config.h" 20 #include "build/build_config.h"
21 #include "cc/output/begin_frame_args.h" 21 #include "cc/output/begin_frame_args.h"
22 #include "cc/output/compositor_frame.h" 22 #include "cc/output/compositor_frame.h"
23 #include "cc/output/compositor_frame_metadata.h" 23 #include "cc/output/compositor_frame_metadata.h"
24 #include "cc/output/copy_output_request.h" 24 #include "cc/output/copy_output_request.h"
25 #include "cc/surfaces/surface.h" 25 #include "cc/surfaces/surface.h"
26 #include "cc/surfaces/surface_manager.h" 26 #include "cc/surfaces/surface_manager.h"
27 #include "components/display_compositor/gl_helper.h"
28 #include "content/browser/browser_thread_impl.h" 27 #include "content/browser/browser_thread_impl.h"
28 #include "content/browser/compositor/gl_helper.h"
29 #include "content/browser/compositor/test/no_transport_image_transport_factory.h " 29 #include "content/browser/compositor/test/no_transport_image_transport_factory.h "
30 #include "content/browser/frame_host/render_widget_host_view_guest.h" 30 #include "content/browser/frame_host/render_widget_host_view_guest.h"
31 #include "content/browser/gpu/compositor_util.h" 31 #include "content/browser/gpu/compositor_util.h"
32 #include "content/browser/renderer_host/input/input_router.h" 32 #include "content/browser/renderer_host/input/input_router.h"
33 #include "content/browser/renderer_host/input/mouse_wheel_event_queue.h" 33 #include "content/browser/renderer_host/input/mouse_wheel_event_queue.h"
34 #include "content/browser/renderer_host/input/web_input_event_util.h" 34 #include "content/browser/renderer_host/input/web_input_event_util.h"
35 #include "content/browser/renderer_host/overscroll_controller.h" 35 #include "content/browser/renderer_host/overscroll_controller.h"
36 #include "content/browser/renderer_host/overscroll_controller_delegate.h" 36 #include "content/browser/renderer_host/overscroll_controller_delegate.h"
37 #include "content/browser/renderer_host/render_view_host_factory.h" 37 #include "content/browser/renderer_host/render_view_host_factory.h"
38 #include "content/browser/renderer_host/render_widget_host_delegate.h" 38 #include "content/browser/renderer_host/render_widget_host_delegate.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 303
304 void RunOnCompositingDidCommit() { 304 void RunOnCompositingDidCommit() {
305 GetDelegatedFrameHost()->OnCompositingDidCommitForTesting( 305 GetDelegatedFrameHost()->OnCompositingDidCommitForTesting(
306 window()->GetHost()->compositor()); 306 window()->GetHost()->compositor());
307 } 307 }
308 308
309 void InterceptCopyOfOutput(std::unique_ptr<cc::CopyOutputRequest> request) { 309 void InterceptCopyOfOutput(std::unique_ptr<cc::CopyOutputRequest> request) {
310 last_copy_request_ = std::move(request); 310 last_copy_request_ = std::move(request);
311 if (last_copy_request_->has_texture_mailbox()) { 311 if (last_copy_request_->has_texture_mailbox()) {
312 // Give the resulting texture a size. 312 // Give the resulting texture a size.
313 display_compositor::GLHelper* gl_helper = 313 GLHelper* gl_helper = ImageTransportFactory::GetInstance()->GetGLHelper();
314 ImageTransportFactory::GetInstance()->GetGLHelper();
315 GLuint texture = gl_helper->ConsumeMailboxToTexture( 314 GLuint texture = gl_helper->ConsumeMailboxToTexture(
316 last_copy_request_->texture_mailbox().mailbox(), 315 last_copy_request_->texture_mailbox().mailbox(),
317 last_copy_request_->texture_mailbox().sync_token()); 316 last_copy_request_->texture_mailbox().sync_token());
318 gl_helper->ResizeTexture(texture, window()->bounds().size()); 317 gl_helper->ResizeTexture(texture, window()->bounds().size());
319 gl_helper->DeleteTexture(texture); 318 gl_helper->DeleteTexture(texture);
320 } 319 }
321 } 320 }
322 321
323 cc::SurfaceId surface_id() const { 322 cc::SurfaceId surface_id() const {
324 return GetDelegatedFrameHost()->SurfaceIdForTesting(); 323 return GetDelegatedFrameHost()->SurfaceIdForTesting();
(...skipping 4150 matching lines...) Expand 10 before | Expand all | Expand 10 after
4475 view()->OnGestureEvent(&gesture_event); 4474 view()->OnGestureEvent(&gesture_event);
4476 4475
4477 EXPECT_TRUE(delegate->context_menu_request_received()); 4476 EXPECT_TRUE(delegate->context_menu_request_received());
4478 EXPECT_EQ(delegate->context_menu_source_type(), ui::MENU_SOURCE_TOUCH); 4477 EXPECT_EQ(delegate->context_menu_source_type(), ui::MENU_SOURCE_TOUCH);
4479 #endif 4478 #endif
4480 4479
4481 RenderViewHostFactory::set_is_real_render_view_host(false); 4480 RenderViewHostFactory::set_is_real_render_view_host(false);
4482 } 4481 }
4483 4482
4484 } // namespace content 4483 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698