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; | |
273 } | 272 } |
274 #endif | 273 #endif |
275 | 274 |
276 compositor->Initialize(settings); | 275 compositor->Initialize(settings); |
277 | 276 |
278 return compositor.Pass(); | 277 return compositor.Pass(); |
279 } | 278 } |
280 | 279 |
281 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget, | 280 RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget, |
282 bool threaded) | 281 bool threaded) |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 widget_->OnSwapBuffersAborted(); | 627 widget_->OnSwapBuffersAborted(); |
629 } | 628 } |
630 | 629 |
631 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 630 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
632 cc::ContextProvider* provider = | 631 cc::ContextProvider* provider = |
633 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 632 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
634 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 633 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
635 } | 634 } |
636 | 635 |
637 } // namespace content | 636 } // namespace content |
OLD | NEW |