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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_blink_platform_impl.cc
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 7696ab92539b14069f272a2e1427ed707d94265b..c4a009dc7ab3ff296833d3ed099402d86a7bbe44 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -630,8 +630,9 @@ bool RendererBlinkPlatformImpl::databaseSetFileSize(
bool RendererBlinkPlatformImpl::canAccelerate2dCanvas() {
#if defined(OS_ANDROID)
- if (SynchronousCompositorFactory* factory =
- SynchronousCompositorFactory::GetInstance()) {
+ SynchronousCompositorFactory* factory =
+ SynchronousCompositorFactory::GetInstance();
+ if (factory && factory->OverrideWithFactory()) {
return factory->GetGPUInfo().SupportsAccelerated2dCanvas();
}
#endif
@@ -947,13 +948,13 @@ RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
return NULL;
#if defined(OS_ANDROID)
- if (SynchronousCompositorFactory* factory =
- SynchronousCompositorFactory::GetInstance()) {
+ SynchronousCompositorFactory* factory =
+ SynchronousCompositorFactory::GetInstance();
+ if (factory && factory->OverrideWithFactory()) {
scoped_ptr<gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl>
in_process_context(
factory->CreateOffscreenGraphicsContext3D(attributes));
- if (!in_process_context ||
- !in_process_context->InitializeOnCurrentThread())
+ if (!in_process_context || !in_process_context->InitializeOnCurrentThread())
return NULL;
return in_process_context.release();
}
« 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