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

Side by Side Diff: content/renderer/render_thread_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
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/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 NULL)); 1476 NULL));
1477 } 1477 }
1478 1478
1479 scoped_refptr<cc_blink::ContextProviderWebContext> 1479 scoped_refptr<cc_blink::ContextProviderWebContext>
1480 RenderThreadImpl::SharedMainThreadContextProvider() { 1480 RenderThreadImpl::SharedMainThreadContextProvider() {
1481 DCHECK(IsMainThread()); 1481 DCHECK(IsMainThread());
1482 if (!shared_main_thread_contexts_.get() || 1482 if (!shared_main_thread_contexts_.get() ||
1483 shared_main_thread_contexts_->DestroyedOnMainThread()) { 1483 shared_main_thread_contexts_->DestroyedOnMainThread()) {
1484 shared_main_thread_contexts_ = NULL; 1484 shared_main_thread_contexts_ = NULL;
1485 #if defined(OS_ANDROID) 1485 #if defined(OS_ANDROID)
1486 if (SynchronousCompositorFactory* factory = 1486 SynchronousCompositorFactory* factory =
1487 SynchronousCompositorFactory::GetInstance()) { 1487 SynchronousCompositorFactory::GetInstance();
1488 if (factory && factory->OverrideWithFactory()) {
1488 shared_main_thread_contexts_ = factory->CreateOffscreenContextProvider( 1489 shared_main_thread_contexts_ = factory->CreateOffscreenContextProvider(
1489 GetOffscreenAttribs(), "Offscreen-MainThread"); 1490 GetOffscreenAttribs(), "Offscreen-MainThread");
1490 } 1491 }
1491 #endif 1492 #endif
1492 if (!shared_main_thread_contexts_.get()) { 1493 if (!shared_main_thread_contexts_.get()) {
1493 shared_main_thread_contexts_ = ContextProviderCommandBuffer::Create( 1494 shared_main_thread_contexts_ = ContextProviderCommandBuffer::Create(
1494 CreateOffscreenContext3d(), RENDERER_MAINTHREAD_CONTEXT); 1495 CreateOffscreenContext3d(), RENDERER_MAINTHREAD_CONTEXT);
1495 } 1496 }
1496 if (shared_main_thread_contexts_.get() && 1497 if (shared_main_thread_contexts_.get() &&
1497 !shared_main_thread_contexts_->BindToCurrentThread()) 1498 !shared_main_thread_contexts_->BindToCurrentThread())
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 } 2037 }
2037 2038
2038 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 2039 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
2039 size_t erased = 2040 size_t erased =
2040 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 2041 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
2041 routing_id_); 2042 routing_id_);
2042 DCHECK_EQ(1u, erased); 2043 DCHECK_EQ(1u, erased);
2043 } 2044 }
2044 2045
2045 } // namespace content 2046 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/android/synchronous_compositor_factory.h ('k') | content/renderer/renderer_blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698