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

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

Issue 1365563002: Make channel preemption not require view contexts for hookup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wakeup_gpu
Patch Set: rebase Created 5 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
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_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 28 matching lines...) Expand all
39 #include "content/browser/android/edge_effect.h" 39 #include "content/browser/android/edge_effect.h"
40 #include "content/browser/android/edge_effect_l.h" 40 #include "content/browser/android/edge_effect_l.h"
41 #include "content/browser/android/in_process/synchronous_compositor_impl.h" 41 #include "content/browser/android/in_process/synchronous_compositor_impl.h"
42 #include "content/browser/android/overscroll_controller_android.h" 42 #include "content/browser/android/overscroll_controller_android.h"
43 #include "content/browser/android/popup_touch_handle_drawable.h" 43 #include "content/browser/android/popup_touch_handle_drawable.h"
44 #include "content/browser/devtools/render_frame_devtools_agent_host.h" 44 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
45 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 45 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
46 #include "content/browser/gpu/compositor_util.h" 46 #include "content/browser/gpu/compositor_util.h"
47 #include "content/browser/gpu/gpu_data_manager_impl.h" 47 #include "content/browser/gpu/gpu_data_manager_impl.h"
48 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 48 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
49 #include "content/browser/gpu/gpu_surface_tracker.h"
50 #include "content/browser/media/media_web_contents_observer.h" 49 #include "content/browser/media/media_web_contents_observer.h"
51 #include "content/browser/renderer_host/compositor_impl_android.h" 50 #include "content/browser/renderer_host/compositor_impl_android.h"
52 #include "content/browser/renderer_host/dip_util.h" 51 #include "content/browser/renderer_host/dip_util.h"
53 #include "content/browser/renderer_host/frame_metadata_util.h" 52 #include "content/browser/renderer_host/frame_metadata_util.h"
54 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h " 53 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h "
55 #include "content/browser/renderer_host/input/ui_touch_selection_helper.h" 54 #include "content/browser/renderer_host/input/ui_touch_selection_helper.h"
56 #include "content/browser/renderer_host/input/web_input_event_builders_android.h " 55 #include "content/browser/renderer_host/input/web_input_event_builders_android.h "
57 #include "content/browser/renderer_host/input/web_input_event_util.h" 56 #include "content/browser/renderer_host/input/web_input_event_util.h"
58 #include "content/browser/renderer_host/render_process_host_impl.h" 57 #include "content/browser/renderer_host/render_process_host_impl.h"
59 #include "content/browser/renderer_host/render_view_host_impl.h" 58 #include "content/browser/renderer_host/render_view_host_impl.h"
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 NOTREACHED(); 1522 NOTREACHED();
1524 return false; 1523 return false;
1525 } 1524 }
1526 1525
1527 // TODO(jrg): Find out the implications and answer correctly here, 1526 // TODO(jrg): Find out the implications and answer correctly here,
1528 // as we are returning the WebView and not root window bounds. 1527 // as we are returning the WebView and not root window bounds.
1529 gfx::Rect RenderWidgetHostViewAndroid::GetBoundsInRootWindow() { 1528 gfx::Rect RenderWidgetHostViewAndroid::GetBoundsInRootWindow() {
1530 return GetViewBounds(); 1529 return GetViewBounds();
1531 } 1530 }
1532 1531
1533 gfx::GLSurfaceHandle RenderWidgetHostViewAndroid::GetCompositingSurface() {
1534 gfx::GLSurfaceHandle handle =
1535 gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::NULL_TRANSPORT);
1536 // Null check for when we're running inside content_unittests.
1537 if (using_browser_compositor_ && BrowserGpuChannelHostFactory::instance()) {
1538 handle.parent_client_id =
1539 BrowserGpuChannelHostFactory::instance()->GetGpuChannelId();
1540 }
1541 return handle;
1542 }
1543
1544 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent( 1532 void RenderWidgetHostViewAndroid::ProcessAckedTouchEvent(
1545 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) { 1533 const TouchEventWithLatencyInfo& touch, InputEventAckState ack_result) {
1546 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED; 1534 const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED;
1547 gesture_provider_.OnTouchEventAck(touch.event.uniqueTouchEventId, 1535 gesture_provider_.OnTouchEventAck(touch.event.uniqueTouchEventId,
1548 event_consumed); 1536 event_consumed);
1549 } 1537 }
1550 1538
1551 void RenderWidgetHostViewAndroid::GestureEventAck( 1539 void RenderWidgetHostViewAndroid::GestureEventAck(
1552 const blink::WebGestureEvent& event, 1540 const blink::WebGestureEvent& event,
1553 InputEventAckState ack_result) { 1541 InputEventAckState ack_result) {
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
2011 results->orientationAngle = display.RotationAsDegree(); 1999 results->orientationAngle = display.RotationAsDegree();
2012 results->orientationType = 2000 results->orientationType =
2013 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2001 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2014 gfx::DeviceDisplayInfo info; 2002 gfx::DeviceDisplayInfo info;
2015 results->depth = info.GetBitsPerPixel(); 2003 results->depth = info.GetBitsPerPixel();
2016 results->depthPerComponent = info.GetBitsPerComponent(); 2004 results->depthPerComponent = info.GetBitsPerComponent();
2017 results->isMonochrome = (results->depthPerComponent == 0); 2005 results->isMonochrome = (results->depthPerComponent == 0);
2018 } 2006 }
2019 2007
2020 } // namespace content 2008 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698