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

Unified Diff: content/browser/android/in_process/synchronous_compositor_factory_impl.cc

Issue 916723002: cc: Add threaded GPU rasterization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implement ContextProviderInProcess::DetachFromThread(). Created 5 years, 10 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
Index: content/browser/android/in_process/synchronous_compositor_factory_impl.cc
diff --git a/content/browser/android/in_process/synchronous_compositor_factory_impl.cc b/content/browser/android/in_process/synchronous_compositor_factory_impl.cc
index 1e779ce666867a933c6f636d62170e6f0c4b5af0..282d9755c637d7dad3fc4b1f651803e3ca3020dc 100644
--- a/content/browser/android/in_process/synchronous_compositor_factory_impl.cc
+++ b/content/browser/android/in_process/synchronous_compositor_factory_impl.cc
@@ -67,7 +67,8 @@ scoped_ptr<gpu::GLInProcessContext> CreateOffscreenContext(
scoped_ptr<gpu::GLInProcessContext> CreateContext(
scoped_refptr<gpu::InProcessCommandBuffer::Service> service,
const gpu::GLInProcessContextSharedMemoryLimits& mem_limits,
- bool is_offscreen) {
+ bool is_offscreen,
+ bool share_resources) {
const gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
gpu::gles2::ContextCreationAttribHelper in_process_attribs;
WebGraphicsContext3DImpl::ConvertAttributes(
@@ -81,7 +82,7 @@ scoped_ptr<gpu::GLInProcessContext> CreateContext(
gfx::kNullAcceleratedWidget,
gfx::Size(1, 1),
NULL /* share_context */,
- false /* share_resources */,
+ share_resources /* share_resources */,
in_process_attribs,
gpu_preference,
mem_limits,
@@ -212,8 +213,8 @@ SynchronousCompositorFactoryImpl::CreateOffscreenContextProvider(
WrapContext(context.Pass()), debug_name);
}
-scoped_refptr<cc::ContextProvider> SynchronousCompositorFactoryImpl::
- CreateOnscreenContextProviderForCompositorThread() {
+scoped_refptr<cc::ContextProvider>
+SynchronousCompositorFactoryImpl::CreateContextProviderForCompositor() {
DCHECK(service_.get());
gpu::GLInProcessContextSharedMemoryLimits mem_limits;
@@ -221,7 +222,7 @@ scoped_refptr<cc::ContextProvider> SynchronousCompositorFactoryImpl::
// pipeline is only one frame deep.
mem_limits.mapped_memory_reclaim_limit = 6 * 1024 * 1024;
return webkit::gpu::ContextProviderInProcess::Create(
- WrapContext(CreateContext(nullptr, mem_limits, true)),
+ WrapContext(CreateContext(nullptr, mem_limits, true, true)),
"Child-Compositor");
}
@@ -293,7 +294,7 @@ SynchronousCompositorFactoryImpl::TryCreateStreamTextureFactory() {
// This needs to run in on-screen |service_| context due to SurfaceTexture
// limitations.
video_context_provider_ = new VideoContextProvider(CreateContext(
- service_, gpu::GLInProcessContextSharedMemoryLimits(), false));
+ service_, gpu::GLInProcessContextSharedMemoryLimits(), false, false));
}
return video_context_provider_;
}

Powered by Google App Engine
This is Rietveld 408576698