Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/sys_utils.h" | 9 #include "base/android/sys_utils.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 #include "cc/output/compositor_frame_ack.h" | 25 #include "cc/output/compositor_frame_ack.h" |
| 26 #include "cc/output/copy_output_request.h" | 26 #include "cc/output/copy_output_request.h" |
| 27 #include "cc/output/copy_output_result.h" | 27 #include "cc/output/copy_output_result.h" |
| 28 #include "cc/resources/single_release_callback.h" | 28 #include "cc/resources/single_release_callback.h" |
| 29 #include "cc/trees/layer_tree_host.h" | 29 #include "cc/trees/layer_tree_host.h" |
| 30 #include "content/browser/accessibility/browser_accessibility_manager_android.h" | 30 #include "content/browser/accessibility/browser_accessibility_manager_android.h" |
| 31 #include "content/browser/android/content_view_core_impl.h" | 31 #include "content/browser/android/content_view_core_impl.h" |
| 32 #include "content/browser/android/in_process/synchronous_compositor_impl.h" | 32 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
| 33 #include "content/browser/android/overscroll_glow.h" | 33 #include "content/browser/android/overscroll_glow.h" |
| 34 #include "content/browser/devtools/render_view_devtools_agent_host.h" | 34 #include "content/browser/devtools/render_view_devtools_agent_host.h" |
| 35 #include "content/browser/gpu/compositor_util.h" | |
| 35 #include "content/browser/gpu/gpu_data_manager_impl.h" | 36 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 36 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 37 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| 37 #include "content/browser/gpu/gpu_surface_tracker.h" | 38 #include "content/browser/gpu/gpu_surface_tracker.h" |
| 38 #include "content/browser/renderer_host/compositor_impl_android.h" | 39 #include "content/browser/renderer_host/compositor_impl_android.h" |
| 39 #include "content/browser/renderer_host/dip_util.h" | 40 #include "content/browser/renderer_host/dip_util.h" |
| 40 #include "content/browser/renderer_host/image_transport_factory_android.h" | 41 #include "content/browser/renderer_host/image_transport_factory_android.h" |
| 41 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h " | 42 #include "content/browser/renderer_host/input/synthetic_gesture_target_android.h " |
| 42 #include "content/browser/renderer_host/render_process_host_impl.h" | 43 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 43 #include "content/browser/renderer_host/render_widget_host_impl.h" | 44 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 44 #include "content/common/gpu/client/gl_helper.h" | 45 #include "content/common/gpu/client/gl_helper.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 145 weak_ptr_factory_(this), | 146 weak_ptr_factory_(this), |
| 146 overscroll_effect_enabled_(!CommandLine::ForCurrentProcess()->HasSwitch( | 147 overscroll_effect_enabled_(!CommandLine::ForCurrentProcess()->HasSwitch( |
| 147 switches::kDisableOverscrollEdgeEffect)), | 148 switches::kDisableOverscrollEdgeEffect)), |
| 148 overscroll_effect_(OverscrollGlow::Create(overscroll_effect_enabled_)), | 149 overscroll_effect_(OverscrollGlow::Create(overscroll_effect_enabled_)), |
| 149 flush_input_requested_(false), | 150 flush_input_requested_(false), |
| 150 accelerated_surface_route_id_(0), | 151 accelerated_surface_route_id_(0), |
| 151 using_synchronous_compositor_(SynchronousCompositorImpl::FromID( | 152 using_synchronous_compositor_(SynchronousCompositorImpl::FromID( |
| 152 widget_host->GetProcess()->GetID(), | 153 widget_host->GetProcess()->GetID(), |
| 153 widget_host->GetRoutingID()) != NULL), | 154 widget_host->GetRoutingID()) != NULL), |
| 154 frame_evictor_(new DelegatedFrameEvictor(this)), | 155 frame_evictor_(new DelegatedFrameEvictor(this)), |
| 155 using_delegated_renderer_(CommandLine::ForCurrentProcess()->HasSwitch( | 156 using_delegated_renderer_(IsDelegatedRendererEnabled()), |
|
reveman
2014/03/28 16:50:33
FYI, previous patch was broken as it was using the
| |
| 156 switches::kEnableDelegatedRenderer) && | |
| 157 !CommandLine::ForCurrentProcess()->HasSwitch( | |
| 158 switches::kDisableDelegatedRenderer)), | |
| 159 locks_on_frame_count_(0), | 157 locks_on_frame_count_(0), |
| 160 root_window_destroyed_(false) { | 158 root_window_destroyed_(false) { |
| 161 if (!using_delegated_renderer_) { | 159 if (!using_delegated_renderer_) { |
| 162 texture_layer_ = cc::TextureLayer::Create(NULL); | 160 texture_layer_ = cc::TextureLayer::Create(NULL); |
| 163 layer_ = texture_layer_; | 161 layer_ = texture_layer_; |
| 164 } | 162 } |
| 165 | 163 |
| 166 host_->SetView(this); | 164 host_->SetView(this); |
| 167 SetContentViewCore(content_view_core); | 165 SetContentViewCore(content_view_core); |
| 168 ImageTransportFactoryAndroid::AddObserver(this); | 166 ImageTransportFactoryAndroid::AddObserver(this); |
| (...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1505 // RenderWidgetHostView, public: | 1503 // RenderWidgetHostView, public: |
| 1506 | 1504 |
| 1507 // static | 1505 // static |
| 1508 RenderWidgetHostView* | 1506 RenderWidgetHostView* |
| 1509 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1507 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
| 1510 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1508 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
| 1511 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1509 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
| 1512 } | 1510 } |
| 1513 | 1511 |
| 1514 } // namespace content | 1512 } // namespace content |
| OLD | NEW |