| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 // emulator. Aura Overlay Scrollbar will override below. | 437 // emulator. Aura Overlay Scrollbar will override below. |
| 438 settings.scrollbar_animator = cc::LayerTreeSettings::ANDROID_OVERLAY; | 438 settings.scrollbar_animator = cc::LayerTreeSettings::ANDROID_OVERLAY; |
| 439 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); | 439 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); |
| 440 settings.scrollbar_fade_delay = base::TimeDelta::FromMilliseconds(300); | 440 settings.scrollbar_fade_delay = base::TimeDelta::FromMilliseconds(300); |
| 441 settings.scrollbar_fade_duration = base::TimeDelta::FromMilliseconds(300); | 441 settings.scrollbar_fade_duration = base::TimeDelta::FromMilliseconds(300); |
| 442 | 442 |
| 443 #if defined(OS_ANDROID) | 443 #if defined(OS_ANDROID) |
| 444 bool using_synchronous_compositor = | 444 bool using_synchronous_compositor = |
| 445 GetContentClient()->UsingSynchronousCompositing(); | 445 GetContentClient()->UsingSynchronousCompositing(); |
| 446 | 446 |
| 447 settings.use_stream_video_draw_quad = true; | |
| 448 settings.using_synchronous_renderer_compositor = using_synchronous_compositor; | 447 settings.using_synchronous_renderer_compositor = using_synchronous_compositor; |
| 449 if (using_synchronous_compositor) { | 448 if (using_synchronous_compositor) { |
| 450 // Android WebView uses system scrollbars, so make ours invisible. | 449 // Android WebView uses system scrollbars, so make ours invisible. |
| 451 // http://crbug.com/677348: This can't be done using hide_scrollbars | 450 // http://crbug.com/677348: This can't be done using hide_scrollbars |
| 452 // setting because supporting -webkit custom scrollbars is still desired | 451 // setting because supporting -webkit custom scrollbars is still desired |
| 453 // on sublayers. | 452 // on sublayers. |
| 454 settings.scrollbar_animator = cc::LayerTreeSettings::NO_ANIMATOR; | 453 settings.scrollbar_animator = cc::LayerTreeSettings::NO_ANIMATOR; |
| 455 settings.solid_color_scrollbar_color = SK_ColorTRANSPARENT; | 454 settings.solid_color_scrollbar_color = SK_ColorTRANSPARENT; |
| 456 } | 455 } |
| 457 settings.renderer_settings.highp_threshold_min = 2048; | 456 settings.renderer_settings.highp_threshold_min = 2048; |
| (...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1231 const cc::LocalSurfaceId& local_surface_id) { | 1230 const cc::LocalSurfaceId& local_surface_id) { |
| 1232 layer_tree_host_->SetLocalSurfaceId(local_surface_id); | 1231 layer_tree_host_->SetLocalSurfaceId(local_surface_id); |
| 1233 } | 1232 } |
| 1234 | 1233 |
| 1235 void RenderWidgetCompositor::NotifySwapTime(ReportTimeCallback callback) { | 1234 void RenderWidgetCompositor::NotifySwapTime(ReportTimeCallback callback) { |
| 1236 QueueSwapPromise(base::MakeUnique<ReportTimeSwapPromise>( | 1235 QueueSwapPromise(base::MakeUnique<ReportTimeSwapPromise>( |
| 1237 std::move(callback), base::ThreadTaskRunnerHandle::Get())); | 1236 std::move(callback), base::ThreadTaskRunnerHandle::Get())); |
| 1238 } | 1237 } |
| 1239 | 1238 |
| 1240 } // namespace content | 1239 } // namespace content |
| OLD | NEW |