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