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

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

Issue 2873243002: Move components/display_compositor to components/viz/display_compositor (Closed)
Patch Set: Rebase and fix mac build Created 3 years, 7 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_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <set> 9 #include <set>
10 #include <tuple> 10 #include <tuple>
(...skipping 12 matching lines...) Expand all
23 #include "base/metrics/histogram_macros.h" 23 #include "base/metrics/histogram_macros.h"
24 #include "base/single_thread_task_runner.h" 24 #include "base/single_thread_task_runner.h"
25 #include "base/strings/string_number_conversions.h" 25 #include "base/strings/string_number_conversions.h"
26 #include "base/strings/utf_string_conversions.h" 26 #include "base/strings/utf_string_conversions.h"
27 #include "base/task_scheduler/post_task.h" 27 #include "base/task_scheduler/post_task.h"
28 #include "base/threading/thread_task_runner_handle.h" 28 #include "base/threading/thread_task_runner_handle.h"
29 #include "base/trace_event/trace_event.h" 29 #include "base/trace_event/trace_event.h"
30 #include "build/build_config.h" 30 #include "build/build_config.h"
31 #include "cc/base/switches.h" 31 #include "cc/base/switches.h"
32 #include "cc/output/compositor_frame.h" 32 #include "cc/output/compositor_frame.h"
33 #include "components/display_compositor/host_shared_bitmap_manager.h" 33 #include "components/viz/display_compositor/host_shared_bitmap_manager.h"
34 #include "content/browser/accessibility/browser_accessibility_state_impl.h" 34 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
35 #include "content/browser/bad_message.h" 35 #include "content/browser/bad_message.h"
36 #include "content/browser/browser_plugin/browser_plugin_guest.h" 36 #include "content/browser/browser_plugin/browser_plugin_guest.h"
37 #include "content/browser/child_process_security_policy_impl.h" 37 #include "content/browser/child_process_security_policy_impl.h"
38 #include "content/browser/fileapi/browser_file_system_helper.h" 38 #include "content/browser/fileapi/browser_file_system_helper.h"
39 #include "content/browser/gpu/compositor_util.h" 39 #include "content/browser/gpu/compositor_util.h"
40 #include "content/browser/renderer_host/dip_util.h" 40 #include "content/browser/renderer_host/dip_util.h"
41 #include "content/browser/renderer_host/frame_metadata_util.h" 41 #include "content/browser/renderer_host/frame_metadata_util.h"
42 #include "content/browser/renderer_host/input/input_router_config_helper.h" 42 #include "content/browser/renderer_host/input/input_router_config_helper.h"
43 #include "content/browser/renderer_host/input/input_router_impl.h" 43 #include "content/browser/renderer_host/input/input_router_impl.h"
(...skipping 2046 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 } 2090 }
2091 2091
2092 void RenderWidgetHostImpl::OnShowDisambiguationPopup( 2092 void RenderWidgetHostImpl::OnShowDisambiguationPopup(
2093 const gfx::Rect& rect_pixels, 2093 const gfx::Rect& rect_pixels,
2094 const gfx::Size& size, 2094 const gfx::Size& size,
2095 const cc::SharedBitmapId& id) { 2095 const cc::SharedBitmapId& id) {
2096 DCHECK(!rect_pixels.IsEmpty()); 2096 DCHECK(!rect_pixels.IsEmpty());
2097 DCHECK(!size.IsEmpty()); 2097 DCHECK(!size.IsEmpty());
2098 2098
2099 std::unique_ptr<cc::SharedBitmap> bitmap = 2099 std::unique_ptr<cc::SharedBitmap> bitmap =
2100 display_compositor::HostSharedBitmapManager::current() 2100 viz::HostSharedBitmapManager::current()->GetSharedBitmapFromId(size, id);
2101 ->GetSharedBitmapFromId(size, id);
2102 if (!bitmap) { 2101 if (!bitmap) {
2103 bad_message::ReceivedBadMessage(GetProcess(), 2102 bad_message::ReceivedBadMessage(GetProcess(),
2104 bad_message::RWH_SHARED_BITMAP); 2103 bad_message::RWH_SHARED_BITMAP);
2105 return; 2104 return;
2106 } 2105 }
2107 2106
2108 DCHECK(bitmap->pixels()); 2107 DCHECK(bitmap->pixels());
2109 2108
2110 SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height()); 2109 SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height());
2111 SkBitmap zoomed_bitmap; 2110 SkBitmap zoomed_bitmap;
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
2632 RenderProcessHost* rph = GetProcess(); 2631 RenderProcessHost* rph = GetProcess();
2633 for (std::vector<IPC::Message>::const_iterator i = messages.begin(); 2632 for (std::vector<IPC::Message>::const_iterator i = messages.begin();
2634 i != messages.end(); ++i) { 2633 i != messages.end(); ++i) {
2635 rph->OnMessageReceived(*i); 2634 rph->OnMessageReceived(*i);
2636 if (i->dispatch_error()) 2635 if (i->dispatch_error())
2637 rph->OnBadMessageReceived(*i); 2636 rph->OnBadMessageReceived(*i);
2638 } 2637 }
2639 } 2638 }
2640 2639
2641 } // namespace content 2640 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698