OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer_blink_platform_impl.h" | 5 #include "content/renderer/renderer_blink_platform_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 return WebString::fromUTF8(storage::GetIdentifierFromOrigin( | 678 return WebString::fromUTF8(storage::GetIdentifierFromOrigin( |
679 WebSecurityOriginToGURL(origin))); | 679 WebSecurityOriginToGURL(origin))); |
680 } | 680 } |
681 | 681 |
682 bool RendererBlinkPlatformImpl::canAccelerate2dCanvas() { | 682 bool RendererBlinkPlatformImpl::canAccelerate2dCanvas() { |
683 RenderThreadImpl* thread = RenderThreadImpl::current(); | 683 RenderThreadImpl* thread = RenderThreadImpl::current(); |
684 scoped_refptr<gpu::GpuChannelHost> host = thread->EstablishGpuChannelSync(); | 684 scoped_refptr<gpu::GpuChannelHost> host = thread->EstablishGpuChannelSync(); |
685 if (!host) | 685 if (!host) |
686 return false; | 686 return false; |
687 | 687 |
688 return host->gpu_info().SupportsAccelerated2dCanvas(); | 688 return !host->gpu_info().software_rendering; |
689 } | 689 } |
690 | 690 |
691 bool RendererBlinkPlatformImpl::isThreadedCompositingEnabled() { | 691 bool RendererBlinkPlatformImpl::isThreadedCompositingEnabled() { |
692 RenderThreadImpl* thread = RenderThreadImpl::current(); | 692 RenderThreadImpl* thread = RenderThreadImpl::current(); |
693 // thread can be NULL in tests. | 693 // thread can be NULL in tests. |
694 return thread && thread->compositor_task_runner().get(); | 694 return thread && thread->compositor_task_runner().get(); |
695 } | 695 } |
696 | 696 |
697 bool RendererBlinkPlatformImpl::isThreadedAnimationEnabled() { | 697 bool RendererBlinkPlatformImpl::isThreadedAnimationEnabled() { |
698 RenderThreadImpl* thread = RenderThreadImpl::current(); | 698 RenderThreadImpl* thread = RenderThreadImpl::current(); |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 return &trial_token_validator_; | 1317 return &trial_token_validator_; |
1318 } | 1318 } |
1319 | 1319 |
1320 void RendererBlinkPlatformImpl::workerContextCreated( | 1320 void RendererBlinkPlatformImpl::workerContextCreated( |
1321 const v8::Local<v8::Context>& worker) { | 1321 const v8::Local<v8::Context>& worker) { |
1322 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( | 1322 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( |
1323 worker); | 1323 worker); |
1324 } | 1324 } |
1325 | 1325 |
1326 } // namespace content | 1326 } // namespace content |
OLD | NEW |