| 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_webkitplatformsupport_impl.h" | 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 return createOffscreenGraphicsContext3D(attributes, NULL); | 945 return createOffscreenGraphicsContext3D(attributes, NULL); |
| 946 } | 946 } |
| 947 | 947 |
| 948 blink::WebGraphicsContext3D* | 948 blink::WebGraphicsContext3D* |
| 949 RendererWebKitPlatformSupportImpl::createOffscreenGraphicsContext3D( | 949 RendererWebKitPlatformSupportImpl::createOffscreenGraphicsContext3D( |
| 950 const blink::WebGraphicsContext3D::Attributes& attributes, | 950 const blink::WebGraphicsContext3D::Attributes& attributes, |
| 951 blink::WebGraphicsContext3D* share_context) { | 951 blink::WebGraphicsContext3D* share_context) { |
| 952 if (!RenderThreadImpl::current()) | 952 if (!RenderThreadImpl::current()) |
| 953 return NULL; | 953 return NULL; |
| 954 | 954 |
| 955 scoped_ptr<webkit::gpu::WebGraphicsContext3DImpl> context; | 955 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context; |
| 956 bool must_use_synchronous_factory = false; | 956 bool must_use_synchronous_factory = false; |
| 957 #if defined(OS_ANDROID) | 957 #if defined(OS_ANDROID) |
| 958 if (SynchronousCompositorFactory* factory = | 958 if (SynchronousCompositorFactory* factory = |
| 959 SynchronousCompositorFactory::GetInstance()) { | 959 SynchronousCompositorFactory::GetInstance()) { |
| 960 context.reset(factory->CreateOffscreenGraphicsContext3D(attributes)); | 960 context.reset(factory->CreateOffscreenGraphicsContext3D(attributes)); |
| 961 must_use_synchronous_factory = true; | 961 must_use_synchronous_factory = true; |
| 962 } | 962 } |
| 963 #endif | 963 #endif |
| 964 if (!must_use_synchronous_factory) { | 964 if (!must_use_synchronous_factory) { |
| 965 scoped_refptr<GpuChannelHost> gpu_channel_host( | 965 scoped_refptr<GpuChannelHost> gpu_channel_host( |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1182 void RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting( | 1182 void RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting( |
| 1183 const blink::WebBatteryStatus& status) { | 1183 const blink::WebBatteryStatus& status) { |
| 1184 PlatformEventObserverBase* observer = | 1184 PlatformEventObserverBase* observer = |
| 1185 platform_event_observers_.Lookup(blink::WebPlatformEventBattery); | 1185 platform_event_observers_.Lookup(blink::WebPlatformEventBattery); |
| 1186 if (!observer) | 1186 if (!observer) |
| 1187 return; | 1187 return; |
| 1188 observer->SendFakeDataForTesting((void*)&status); | 1188 observer->SendFakeDataForTesting((void*)&status); |
| 1189 } | 1189 } |
| 1190 | 1190 |
| 1191 } // namespace content | 1191 } // namespace content |
| OLD | NEW |