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

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

Issue 769703005: Move AW renderer compositor context to gpu thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/async_pixel_transfer_manager_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e3148ecefaa45a426a0005ecdc8d840f4a7ebc6f..2ae331b00706d1920c31c39e044b4f509953ce06 100644
--- a/content/browser/android/in_process/synchronous_compositor_factory_impl.cc
+++ b/content/browser/android/in_process/synchronous_compositor_factory_impl.cc
@@ -4,6 +4,7 @@
#include "content/browser/android/in_process/synchronous_compositor_factory_impl.h"
+#include "base/command_line.h"
#include "base/observer_list.h"
#include "content/browser/android/in_process/synchronous_compositor_external_begin_frame_source.h"
#include "content/browser/android/in_process/synchronous_compositor_impl.h"
@@ -13,6 +14,7 @@
#include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h"
#include "gpu/command_buffer/client/gl_in_process_context.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
+#include "gpu/command_buffer/service/gpu_switches.h"
#include "ui/gl/android/surface_texture.h"
#include "ui/gl/gl_surface.h"
#include "ui/gl/gl_surface_stub.h"
@@ -64,7 +66,8 @@ scoped_ptr<gpu::GLInProcessContext> CreateOffscreenContext(
scoped_ptr<gpu::GLInProcessContext> CreateContext(
scoped_refptr<gpu::InProcessCommandBuffer::Service> service,
- const gpu::GLInProcessContextSharedMemoryLimits& mem_limits) {
+ const gpu::GLInProcessContextSharedMemoryLimits& mem_limits,
+ bool is_offscreen) {
const gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
gpu::gles2::ContextCreationAttribHelper in_process_attribs;
WebGraphicsContext3DImpl::ConvertAttributes(
@@ -74,7 +77,7 @@ scoped_ptr<gpu::GLInProcessContext> CreateContext(
scoped_ptr<gpu::GLInProcessContext> context(gpu::GLInProcessContext::Create(
service,
NULL /* surface */,
- false /* is_offscreen */,
+ is_offscreen,
gfx::kNullAcceleratedWidget,
gfx::Size(1, 1),
NULL /* share_context */,
@@ -219,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(service_, mem_limits)),
+ WrapContext(CreateContext(nullptr, mem_limits, true)),
"Child-Compositor");
}
@@ -288,9 +291,10 @@ SynchronousCompositorFactoryImpl::TryCreateStreamTextureFactory() {
if (!video_context_provider_.get()) {
DCHECK(service_.get());
- video_context_provider_ = new VideoContextProvider(
- CreateContext(service_,
- gpu::GLInProcessContextSharedMemoryLimits()));
+ // This needs to run in on-screen |service_| context due to SurfaceTexture
+ // limitations.
+ video_context_provider_ = new VideoContextProvider(CreateContext(
+ service_, gpu::GLInProcessContextSharedMemoryLimits(), false));
}
return video_context_provider_;
}
« no previous file with comments | « no previous file | gpu/command_buffer/service/async_pixel_transfer_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698