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