Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: content/renderer/renderer_blink_platform_impl.cc

Issue 1253553002: Add switch to use ipc command buffer in Android WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "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/location.h" 10 #include "base/location.h"
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 } 623 }
624 624
625 bool RendererBlinkPlatformImpl::databaseSetFileSize( 625 bool RendererBlinkPlatformImpl::databaseSetFileSize(
626 const WebString& vfs_file_name, long long size) { 626 const WebString& vfs_file_name, long long size) {
627 return DatabaseUtil::DatabaseSetFileSize( 627 return DatabaseUtil::DatabaseSetFileSize(
628 vfs_file_name, size, sync_message_filter_.get()); 628 vfs_file_name, size, sync_message_filter_.get());
629 } 629 }
630 630
631 bool RendererBlinkPlatformImpl::canAccelerate2dCanvas() { 631 bool RendererBlinkPlatformImpl::canAccelerate2dCanvas() {
632 #if defined(OS_ANDROID) 632 #if defined(OS_ANDROID)
633 if (SynchronousCompositorFactory* factory = 633 SynchronousCompositorFactory* factory =
634 SynchronousCompositorFactory::GetInstance()) { 634 SynchronousCompositorFactory::GetInstance();
635 if (factory && factory->OverrideWithFactory()) {
635 return factory->GetGPUInfo().SupportsAccelerated2dCanvas(); 636 return factory->GetGPUInfo().SupportsAccelerated2dCanvas();
636 } 637 }
637 #endif 638 #endif
638 639
639 RenderThreadImpl* thread = RenderThreadImpl::current(); 640 RenderThreadImpl* thread = RenderThreadImpl::current();
640 GpuChannelHost* host = thread->EstablishGpuChannelSync( 641 GpuChannelHost* host = thread->EstablishGpuChannelSync(
641 CAUSE_FOR_GPU_LAUNCH_CANVAS_2D); 642 CAUSE_FOR_GPU_LAUNCH_CANVAS_2D);
642 if (!host) 643 if (!host)
643 return false; 644 return false;
644 645
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 941
941 blink::WebGraphicsContext3D* 942 blink::WebGraphicsContext3D*
942 RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D( 943 RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
943 const blink::WebGraphicsContext3D::Attributes& attributes, 944 const blink::WebGraphicsContext3D::Attributes& attributes,
944 blink::WebGraphicsContext3D* share_context, 945 blink::WebGraphicsContext3D* share_context,
945 blink::WebGLInfo* gl_info) { 946 blink::WebGLInfo* gl_info) {
946 if (!RenderThreadImpl::current()) 947 if (!RenderThreadImpl::current())
947 return NULL; 948 return NULL;
948 949
949 #if defined(OS_ANDROID) 950 #if defined(OS_ANDROID)
950 if (SynchronousCompositorFactory* factory = 951 SynchronousCompositorFactory* factory =
951 SynchronousCompositorFactory::GetInstance()) { 952 SynchronousCompositorFactory::GetInstance();
953 if (factory && factory->OverrideWithFactory()) {
952 scoped_ptr<gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl> 954 scoped_ptr<gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl>
953 in_process_context( 955 in_process_context(
954 factory->CreateOffscreenGraphicsContext3D(attributes)); 956 factory->CreateOffscreenGraphicsContext3D(attributes));
955 if (!in_process_context || 957 if (!in_process_context || !in_process_context->InitializeOnCurrentThread())
956 !in_process_context->InitializeOnCurrentThread())
957 return NULL; 958 return NULL;
958 return in_process_context.release(); 959 return in_process_context.release();
959 } 960 }
960 #endif 961 #endif
961 962
962 scoped_refptr<GpuChannelHost> gpu_channel_host( 963 scoped_refptr<GpuChannelHost> gpu_channel_host(
963 RenderThreadImpl::current()->EstablishGpuChannelSync( 964 RenderThreadImpl::current()->EstablishGpuChannelSync(
964 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ); 965 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) );
965 966
966 if (gpu_channel_host.get() && gl_info) { 967 if (gpu_channel_host.get() && gl_info) {
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 //------------------------------------------------------------------------------ 1237 //------------------------------------------------------------------------------
1237 1238
1238 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( 1239 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting(
1239 const blink::WebBatteryStatus& status) { 1240 const blink::WebBatteryStatus& status) {
1240 if (!g_test_battery_status_listener) 1241 if (!g_test_battery_status_listener)
1241 return; 1242 return;
1242 g_test_battery_status_listener->updateBatteryStatus(status); 1243 g_test_battery_status_listener->updateBatteryStatus(status);
1243 } 1244 }
1244 1245
1245 } // namespace content 1246 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698