| 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 base::android::SysUtils::IsLowEndDevice() && | 261 base::android::SysUtils::IsLowEndDevice() && |
| 262 !widget->UsingSynchronousRendererCompositor() && | 262 !widget->UsingSynchronousRendererCompositor() && |
| 263 !cmd->HasSwitch(cc::switches::kDisable4444Textures); | 263 !cmd->HasSwitch(cc::switches::kDisable4444Textures); |
| 264 #elif !defined(OS_MACOSX) | 264 #elif !defined(OS_MACOSX) |
| 265 if (cmd->HasSwitch(switches::kEnableOverlayScrollbars)) { | 265 if (cmd->HasSwitch(switches::kEnableOverlayScrollbars)) { |
| 266 settings.scrollbar_animator = cc::LayerTreeSettings::Thinning; | 266 settings.scrollbar_animator = cc::LayerTreeSettings::Thinning; |
| 267 } | 267 } |
| 268 if (cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport) || | 268 if (cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport) || |
| 269 cmd->HasSwitch(switches::kEnableOverlayScrollbars)) { | 269 cmd->HasSwitch(switches::kEnableOverlayScrollbars)) { |
| 270 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); | 270 settings.solid_color_scrollbar_color = SkColorSetARGB(128, 128, 128, 128); |
| 271 settings.scrollbar_animator = cc::LayerTreeSettings::LinearFade; | |
| 272 } | 271 } |
| 273 #endif | 272 #endif |
| 274 | 273 |
| 275 compositor->Initialize(settings); | 274 compositor->Initialize(settings); |
| 276 | 275 |
| 277 return compositor.Pass(); | 276 return compositor.Pass(); |
| 278 } | 277 } |
| 279 | 278 |
| 280 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget, | 279 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget, |
| 281 bool threaded) | 280 bool threaded) |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 widget_->OnSwapBuffersAborted(); | 626 widget_->OnSwapBuffersAborted(); |
| 628 } | 627 } |
| 629 | 628 |
| 630 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 629 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
| 631 cc::ContextProvider* provider = | 630 cc::ContextProvider* provider = |
| 632 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 631 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 633 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 632 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 634 } | 633 } |
| 635 | 634 |
| 636 } // namespace content | 635 } // namespace content |
| OLD | NEW |