| 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 // emulator. Aura Overlay Scrollbar will override below. | 441 // emulator. Aura Overlay Scrollbar will override below. |
| 442 settings.scrollbar_animator = cc::LayerTreeSettings::ANDROID_OVERLAY; | 442 settings.scrollbar_animator = cc::LayerTreeSettings::ANDROID_OVERLAY; |
| 443 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); | 443 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); |
| 444 settings.scrollbar_fade_delay = base::TimeDelta::FromMilliseconds(300); | 444 settings.scrollbar_fade_delay = base::TimeDelta::FromMilliseconds(300); |
| 445 settings.scrollbar_fade_duration = base::TimeDelta::FromMilliseconds(300); | 445 settings.scrollbar_fade_duration = base::TimeDelta::FromMilliseconds(300); |
| 446 | 446 |
| 447 #if defined(OS_ANDROID) | 447 #if defined(OS_ANDROID) |
| 448 bool using_synchronous_compositor = | 448 bool using_synchronous_compositor = |
| 449 GetContentClient()->UsingSynchronousCompositing(); | 449 GetContentClient()->UsingSynchronousCompositing(); |
| 450 | 450 |
| 451 settings.use_stream_video_draw_quad = true; |
| 451 settings.using_synchronous_renderer_compositor = using_synchronous_compositor; | 452 settings.using_synchronous_renderer_compositor = using_synchronous_compositor; |
| 452 if (using_synchronous_compositor) { | 453 if (using_synchronous_compositor) { |
| 453 // Android WebView uses system scrollbars, so make ours invisible. | 454 // Android WebView uses system scrollbars, so make ours invisible. |
| 454 // http://crbug.com/677348: This can't be done using hide_scrollbars | 455 // http://crbug.com/677348: This can't be done using hide_scrollbars |
| 455 // setting because supporting -webkit custom scrollbars is still desired | 456 // setting because supporting -webkit custom scrollbars is still desired |
| 456 // on sublayers. | 457 // on sublayers. |
| 457 settings.scrollbar_animator = cc::LayerTreeSettings::NO_ANIMATOR; | 458 settings.scrollbar_animator = cc::LayerTreeSettings::NO_ANIMATOR; |
| 458 settings.solid_color_scrollbar_color = SK_ColorTRANSPARENT; | 459 settings.solid_color_scrollbar_color = SK_ColorTRANSPARENT; |
| 459 } | 460 } |
| 460 // Android WebView handles root layer flings itself. | 461 // Android WebView handles root layer flings itself. |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1252 void RenderWidgetCompositor::NotifySwapTime(ReportTimeCallback callback) { | 1253 void RenderWidgetCompositor::NotifySwapTime(ReportTimeCallback callback) { |
| 1253 QueueSwapPromise(base::MakeUnique<ReportTimeSwapPromise>( | 1254 QueueSwapPromise(base::MakeUnique<ReportTimeSwapPromise>( |
| 1254 std::move(callback), base::ThreadTaskRunnerHandle::Get())); | 1255 std::move(callback), base::ThreadTaskRunnerHandle::Get())); |
| 1255 } | 1256 } |
| 1256 | 1257 |
| 1257 void RenderWidgetCompositor::RequestBeginMainFrameNotExpected(bool new_state) { | 1258 void RenderWidgetCompositor::RequestBeginMainFrameNotExpected(bool new_state) { |
| 1258 layer_tree_host_->RequestBeginMainFrameNotExpected(new_state); | 1259 layer_tree_host_->RequestBeginMainFrameNotExpected(new_state); |
| 1259 } | 1260 } |
| 1260 | 1261 |
| 1261 } // namespace content | 1262 } // namespace content |
| OLD | NEW |