| 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 <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #if defined(OS_ANDROID) | 10 #if defined(OS_ANDROID) |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 base::android::SysUtils::IsLowEndDevice() && | 297 base::android::SysUtils::IsLowEndDevice() && |
| 298 !widget->UsingSynchronousRendererCompositor() && | 298 !widget->UsingSynchronousRendererCompositor() && |
| 299 !cmd->HasSwitch(cc::switches::kDisable4444Textures); | 299 !cmd->HasSwitch(cc::switches::kDisable4444Textures); |
| 300 #elif !defined(OS_MACOSX) | 300 #elif !defined(OS_MACOSX) |
| 301 if (cmd->HasSwitch(switches::kEnableOverlayScrollbars)) { | 301 if (cmd->HasSwitch(switches::kEnableOverlayScrollbars)) { |
| 302 settings.scrollbar_animator = cc::LayerTreeSettings::Thinning; | 302 settings.scrollbar_animator = cc::LayerTreeSettings::Thinning; |
| 303 } | 303 } |
| 304 if (cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport) || | 304 if (cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport) || |
| 305 cmd->HasSwitch(switches::kEnableOverlayScrollbars)) { | 305 cmd->HasSwitch(switches::kEnableOverlayScrollbars)) { |
| 306 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); | 306 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); |
| 307 settings.scrollbar_animator = cc::LayerTreeSettings::LinearFade; |
| 307 } | 308 } |
| 308 #endif | 309 #endif |
| 309 | 310 |
| 310 if (!compositor->initialize(settings)) | 311 if (!compositor->initialize(settings)) |
| 311 return scoped_ptr<RenderWidgetCompositor>(); | 312 return scoped_ptr<RenderWidgetCompositor>(); |
| 312 | 313 |
| 313 return compositor.Pass(); | 314 return compositor.Pass(); |
| 314 } | 315 } |
| 315 | 316 |
| 316 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget, | 317 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget, |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 if (!suppress_schedule_composite_) | 639 if (!suppress_schedule_composite_) |
| 639 widget_->scheduleComposite(); | 640 widget_->scheduleComposite(); |
| 640 } | 641 } |
| 641 | 642 |
| 642 scoped_refptr<cc::ContextProvider> | 643 scoped_refptr<cc::ContextProvider> |
| 643 RenderWidgetCompositor::OffscreenContextProvider() { | 644 RenderWidgetCompositor::OffscreenContextProvider() { |
| 644 return RenderThreadImpl::current()->OffscreenCompositorContextProvider(); | 645 return RenderThreadImpl::current()->OffscreenCompositorContextProvider(); |
| 645 } | 646 } |
| 646 | 647 |
| 647 } // namespace content | 648 } // namespace content |
| OLD | NEW |