| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/gpu/render_widget_compositor.h" | 5 #include "content/renderer/gpu/render_widget_compositor.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 GetSwitchValueAsInt( | 376 GetSwitchValueAsInt( |
| 377 cmd, cc::switches::kSlowDownRasterScaleFactor, kMinSlowDownScaleFactor, | 377 cmd, cc::switches::kSlowDownRasterScaleFactor, kMinSlowDownScaleFactor, |
| 378 kMaxSlowDownScaleFactor, | 378 kMaxSlowDownScaleFactor, |
| 379 &settings.initial_debug_state.slow_down_raster_scale_factor); | 379 &settings.initial_debug_state.slow_down_raster_scale_factor); |
| 380 } | 380 } |
| 381 | 381 |
| 382 #if defined(OS_ANDROID) | 382 #if defined(OS_ANDROID) |
| 383 bool using_synchronous_compositor = | 383 bool using_synchronous_compositor = |
| 384 GetContentClient()->UsingSynchronousCompositing(); | 384 GetContentClient()->UsingSynchronousCompositing(); |
| 385 | 385 |
| 386 settings.use_stream_video_draw_quad = true; |
| 386 settings.using_synchronous_renderer_compositor = using_synchronous_compositor; | 387 settings.using_synchronous_renderer_compositor = using_synchronous_compositor; |
| 387 if (using_synchronous_compositor) { | 388 if (using_synchronous_compositor) { |
| 388 // Android WebView uses system scrollbars, so make ours invisible. | 389 // Android WebView uses system scrollbars, so make ours invisible. |
| 389 // http://crbug.com/677348: This can't be done using hide_scrollbars | 390 // http://crbug.com/677348: This can't be done using hide_scrollbars |
| 390 // setting because supporting -webkit custom scrollbars is still desired | 391 // setting because supporting -webkit custom scrollbars is still desired |
| 391 // on sublayers. | 392 // on sublayers. |
| 392 settings.scrollbar_animator = cc::LayerTreeSettings::NO_ANIMATOR; | 393 settings.scrollbar_animator = cc::LayerTreeSettings::NO_ANIMATOR; |
| 393 settings.solid_color_scrollbar_color = SK_ColorTRANSPARENT; | 394 settings.solid_color_scrollbar_color = SK_ColorTRANSPARENT; |
| 394 } else { | 395 } else { |
| 395 settings.scrollbar_animator = cc::LayerTreeSettings::ANDROID_OVERLAY; | 396 settings.scrollbar_animator = cc::LayerTreeSettings::ANDROID_OVERLAY; |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { | 1146 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { |
| 1146 layer_tree_host_->SetContentSourceId(id); | 1147 layer_tree_host_->SetContentSourceId(id); |
| 1147 } | 1148 } |
| 1148 | 1149 |
| 1149 void RenderWidgetCompositor::SetLocalSurfaceId( | 1150 void RenderWidgetCompositor::SetLocalSurfaceId( |
| 1150 const cc::LocalSurfaceId& local_surface_id) { | 1151 const cc::LocalSurfaceId& local_surface_id) { |
| 1151 layer_tree_host_->SetLocalSurfaceId(local_surface_id); | 1152 layer_tree_host_->SetLocalSurfaceId(local_surface_id); |
| 1152 } | 1153 } |
| 1153 | 1154 |
| 1154 } // namespace content | 1155 } // namespace content |
| OLD | NEW |