summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/browser/compositor/browser_compositor_output_surface.cc8
-rw-r--r--content/browser/compositor/browser_compositor_output_surface.h1
-rw-r--r--content/browser/compositor/gpu_browser_compositor_output_surface.cc2
-rw-r--r--content/browser/compositor/gpu_browser_compositor_output_surface.h1
-rw-r--r--content/browser/compositor/gpu_process_transport_factory.cc35
-rw-r--r--content/browser/compositor/gpu_process_transport_factory.h1
-rw-r--r--content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc2
-rw-r--r--content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.h1
-rw-r--r--content/browser/compositor/offscreen_browser_compositor_output_surface.cc2
-rw-r--r--content/browser/compositor/offscreen_browser_compositor_output_surface.h1
-rw-r--r--content/browser/compositor/reflector_impl_unittest.cc1
-rw-r--r--content/browser/gpu/compositor_util.cc8
-rw-r--r--content/browser/renderer_host/compositor_impl_android.cc2
-rw-r--r--content/common/gpu/client/command_buffer_metrics.cc6
-rw-r--r--content/common/gpu/client/command_buffer_metrics.h1
-rw-r--r--content/renderer/gpu/render_widget_compositor.cc5
16 files changed, 18 insertions, 59 deletions
diff --git a/content/browser/compositor/browser_compositor_output_surface.cc b/content/browser/compositor/browser_compositor_output_surface.cc
index bdf3a1b..0e014c9 100644
--- a/content/browser/compositor/browser_compositor_output_surface.cc
+++ b/content/browser/compositor/browser_compositor_output_surface.cc
@@ -17,16 +17,14 @@ namespace content {
BrowserCompositorOutputSurface::BrowserCompositorOutputSurface(
const scoped_refptr<cc::ContextProvider>& context_provider,
- const scoped_refptr<cc::ContextProvider>& worker_context_provider,
const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
scoped_ptr<BrowserCompositorOverlayCandidateValidator>
overlay_candidate_validator)
- : OutputSurface(context_provider, worker_context_provider),
+ : OutputSurface(context_provider),
vsync_manager_(vsync_manager),
reflector_(nullptr),
- use_begin_frame_scheduling_(
- base::CommandLine::ForCurrentProcess()
- ->HasSwitch(cc::switches::kEnableBeginFrameScheduling)) {
+ use_begin_frame_scheduling_(base::CommandLine::ForCurrentProcess()->
+ HasSwitch(cc::switches::kEnableBeginFrameScheduling)) {
overlay_candidate_validator_ = overlay_candidate_validator.Pass();
Initialize();
}
diff --git a/content/browser/compositor/browser_compositor_output_surface.h b/content/browser/compositor/browser_compositor_output_surface.h
index f5da02d..f582776 100644
--- a/content/browser/compositor/browser_compositor_output_surface.h
+++ b/content/browser/compositor/browser_compositor_output_surface.h
@@ -56,7 +56,6 @@ class CONTENT_EXPORT BrowserCompositorOutputSurface
// Constructor used by the accelerated implementation.
BrowserCompositorOutputSurface(
const scoped_refptr<cc::ContextProvider>& context,
- const scoped_refptr<cc::ContextProvider>& worker_context,
const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
scoped_ptr<BrowserCompositorOverlayCandidateValidator>
overlay_candidate_validator);
diff --git a/content/browser/compositor/gpu_browser_compositor_output_surface.cc b/content/browser/compositor/gpu_browser_compositor_output_surface.cc
index 70725a2..81da36d 100644
--- a/content/browser/compositor/gpu_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/gpu_browser_compositor_output_surface.cc
@@ -17,12 +17,10 @@ namespace content {
GpuBrowserCompositorOutputSurface::GpuBrowserCompositorOutputSurface(
const scoped_refptr<ContextProviderCommandBuffer>& context,
- const scoped_refptr<ContextProviderCommandBuffer>& worker_context,
const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
scoped_ptr<BrowserCompositorOverlayCandidateValidator>
overlay_candidate_validator)
: BrowserCompositorOutputSurface(context,
- worker_context,
vsync_manager,
overlay_candidate_validator.Pass()),
#if defined(OS_MACOSX)
diff --git a/content/browser/compositor/gpu_browser_compositor_output_surface.h b/content/browser/compositor/gpu_browser_compositor_output_surface.h
index 7b4f242..3bc2a3a 100644
--- a/content/browser/compositor/gpu_browser_compositor_output_surface.h
+++ b/content/browser/compositor/gpu_browser_compositor_output_surface.h
@@ -26,7 +26,6 @@ class GpuBrowserCompositorOutputSurface
public:
GpuBrowserCompositorOutputSurface(
const scoped_refptr<ContextProviderCommandBuffer>& context,
- const scoped_refptr<ContextProviderCommandBuffer>& worker_context,
const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
scoped_ptr<BrowserCompositorOverlayCandidateValidator>
overlay_candidate_validator);
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index 4c0b363..86853c8 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -241,13 +241,6 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
scoped_refptr<ContextProviderCommandBuffer> context_provider;
if (create_gpu_output_surface) {
- // Try to reuse existing worker context provider.
- if (shared_worker_context_provider_) {
- base::AutoLock lock(*shared_worker_context_provider_->GetLock());
- if (shared_worker_context_provider_->ContextGL()
- ->GetGraphicsResetStatusKHR() != GL_NO_ERROR)
- shared_worker_context_provider_ = nullptr;
- }
scoped_refptr<GpuChannelHost> gpu_channel_host =
BrowserGpuChannelHostFactory::instance()->GetGpuChannel();
if (gpu_channel_host.get()) {
@@ -257,24 +250,12 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
BROWSER_COMPOSITOR_ONSCREEN_CONTEXT);
if (context_provider && !context_provider->BindToCurrentThread())
context_provider = nullptr;
- if (!shared_worker_context_provider_) {
- shared_worker_context_provider_ = ContextProviderCommandBuffer::Create(
- GpuProcessTransportFactory::CreateContextCommon(gpu_channel_host,
- 0),
- BROWSER_WORKER_CONTEXT);
- if (shared_worker_context_provider_ &&
- !shared_worker_context_provider_->BindToCurrentThread())
- shared_worker_context_provider_ = nullptr;
- }
}
- bool created_gpu_browser_compositor =
- !!context_provider && !!shared_worker_context_provider_;
-
UMA_HISTOGRAM_BOOLEAN("Aura.CreatedGpuBrowserCompositor",
- created_gpu_browser_compositor);
+ !!context_provider.get());
- if (!created_gpu_browser_compositor) {
+ if (!context_provider) {
// Try again.
CauseForGpuLaunch cause =
CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE;
@@ -297,8 +278,7 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
context_provider->ContextCapabilities();
if (!data->surface_id) {
surface = make_scoped_ptr(new OffscreenBrowserCompositorOutputSurface(
- context_provider, shared_worker_context_provider_,
- compositor->vsync_manager(),
+ context_provider, compositor->vsync_manager(),
scoped_ptr<BrowserCompositorOverlayCandidateValidator>()));
} else if (capabilities.gpu.surfaceless) {
GLenum target = GL_TEXTURE_2D;
@@ -309,15 +289,13 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
#endif
surface =
make_scoped_ptr(new GpuSurfacelessBrowserCompositorOutputSurface(
- context_provider, shared_worker_context_provider_,
- data->surface_id, compositor->vsync_manager(),
+ context_provider, data->surface_id, compositor->vsync_manager(),
CreateOverlayCandidateValidator(compositor->widget()), target,
format, BrowserGpuMemoryBufferManager::current()));
} else {
if (!surface) {
surface = make_scoped_ptr(new GpuBrowserCompositorOutputSurface(
- context_provider, shared_worker_context_provider_,
- compositor->vsync_manager(),
+ context_provider, compositor->vsync_manager(),
CreateOverlayCandidateValidator(compositor->widget())));
}
}
@@ -348,8 +326,7 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
scoped_ptr<cc::SurfaceDisplayOutputSurface> output_surface(
new cc::SurfaceDisplayOutputSurface(
- manager, compositor->surface_id_allocator(), context_provider,
- shared_worker_context_provider_));
+ manager, compositor->surface_id_allocator(), context_provider));
display_client->set_surface_output_surface(output_surface.get());
output_surface->set_display_client(display_client.get());
display_client->display()->Resize(compositor->size());
diff --git a/content/browser/compositor/gpu_process_transport_factory.h b/content/browser/compositor/gpu_process_transport_factory.h
index 564b3cd..c16b36e 100644
--- a/content/browser/compositor/gpu_process_transport_factory.h
+++ b/content/browser/compositor/gpu_process_transport_factory.h
@@ -102,7 +102,6 @@ class GpuProcessTransportFactory
uint32_t next_surface_id_namespace_;
scoped_ptr<cc::TaskGraphRunner> task_graph_runner_;
scoped_ptr<base::SimpleThread> raster_thread_;
- scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_;
#if defined(OS_WIN)
scoped_ptr<OutputDeviceBacking> software_backing_;
diff --git a/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc b/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
index 60dc778..62b1aae 100644
--- a/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
@@ -19,7 +19,6 @@ namespace content {
GpuSurfacelessBrowserCompositorOutputSurface::
GpuSurfacelessBrowserCompositorOutputSurface(
const scoped_refptr<ContextProviderCommandBuffer>& context,
- const scoped_refptr<ContextProviderCommandBuffer>& worker_context,
int surface_id,
const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
scoped_ptr<BrowserCompositorOverlayCandidateValidator>
@@ -28,7 +27,6 @@ GpuSurfacelessBrowserCompositorOutputSurface::
unsigned int internalformat,
BrowserGpuMemoryBufferManager* gpu_memory_buffer_manager)
: GpuBrowserCompositorOutputSurface(context,
- worker_context,
vsync_manager,
overlay_candidate_validator.Pass()),
internalformat_(internalformat),
diff --git a/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.h b/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.h
index ed5618d..27bb335 100644
--- a/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.h
+++ b/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.h
@@ -18,7 +18,6 @@ class GpuSurfacelessBrowserCompositorOutputSurface
public:
GpuSurfacelessBrowserCompositorOutputSurface(
const scoped_refptr<ContextProviderCommandBuffer>& context,
- const scoped_refptr<ContextProviderCommandBuffer>& worker_context,
int surface_id,
const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
scoped_ptr<BrowserCompositorOverlayCandidateValidator>
diff --git a/content/browser/compositor/offscreen_browser_compositor_output_surface.cc b/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
index da972c7..599f553 100644
--- a/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
@@ -30,12 +30,10 @@ namespace content {
OffscreenBrowserCompositorOutputSurface::
OffscreenBrowserCompositorOutputSurface(
const scoped_refptr<ContextProviderCommandBuffer>& context,
- const scoped_refptr<ContextProviderCommandBuffer>& worker_context,
const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
scoped_ptr<BrowserCompositorOverlayCandidateValidator>
overlay_candidate_validator)
: BrowserCompositorOutputSurface(context,
- worker_context,
vsync_manager,
overlay_candidate_validator.Pass()),
fbo_(0),
diff --git a/content/browser/compositor/offscreen_browser_compositor_output_surface.h b/content/browser/compositor/offscreen_browser_compositor_output_surface.h
index c9e32e7..67fc224 100644
--- a/content/browser/compositor/offscreen_browser_compositor_output_surface.h
+++ b/content/browser/compositor/offscreen_browser_compositor_output_surface.h
@@ -23,7 +23,6 @@ class OffscreenBrowserCompositorOutputSurface
public:
OffscreenBrowserCompositorOutputSurface(
const scoped_refptr<ContextProviderCommandBuffer>& context,
- const scoped_refptr<ContextProviderCommandBuffer>& worker_context,
const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
scoped_ptr<BrowserCompositorOverlayCandidateValidator>
overlay_candidate_validator);
diff --git a/content/browser/compositor/reflector_impl_unittest.cc b/content/browser/compositor/reflector_impl_unittest.cc
index 3377b8a..ce9fbb9 100644
--- a/content/browser/compositor/reflector_impl_unittest.cc
+++ b/content/browser/compositor/reflector_impl_unittest.cc
@@ -74,7 +74,6 @@ class TestOutputSurface : public BrowserCompositorOutputSurface {
const scoped_refptr<cc::ContextProvider>& context_provider,
const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager)
: BrowserCompositorOutputSurface(context_provider,
- nullptr,
vsync_manager,
CreateTestValidatorOzone().Pass()) {}
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
index 9646b8f..342aafb 100644
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
@@ -242,6 +242,14 @@ bool IsOneCopyUploadEnabled() {
bool IsZeroCopyUploadEnabled() {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
+ // Single-threaded mode in the renderer process (for layout tests) is
+ // synchronous, which depends on tiles being ready to draw when raster is
+ // complete. Therefore, it must use one of zero copy, software raster, or
+ // GPU raster. So we force zero-copy on for the case where software/GPU raster
+ // is not used.
+ // TODO(reveman): One-copy can work with sync compositing: crbug.com/490295.
+ if (command_line.HasSwitch(switches::kDisableThreadedCompositing))
+ return true;
return command_line.HasSwitch(switches::kEnableZeroCopy);
}
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index b5ee3fa..d5bb4b7 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -673,7 +673,7 @@ void CompositorImpl::CreateOutputSurface() {
base::ThreadTaskRunnerHandle::Get()));
scoped_ptr<cc::SurfaceDisplayOutputSurface> surface_output_surface(
new cc::SurfaceDisplayOutputSurface(
- manager, surface_id_allocator_.get(), context_provider, nullptr));
+ manager, surface_id_allocator_.get(), context_provider));
display_client_->set_surface_output_surface(surface_output_surface.get());
surface_output_surface->set_display_client(display_client_.get());
diff --git a/content/common/gpu/client/command_buffer_metrics.cc b/content/common/gpu/client/command_buffer_metrics.cc
index 5065ca5..d16f276 100644
--- a/content/common/gpu/client/command_buffer_metrics.cc
+++ b/content/common/gpu/client/command_buffer_metrics.cc
@@ -79,10 +79,6 @@ void RecordContextLost(CommandBufferContextType type,
UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.BrowserMainThread", reason,
CONTEXT_LOST_REASON_MAX_ENUM);
break;
- case BROWSER_WORKER_CONTEXT:
- UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.BrowserWorker", reason,
- CONTEXT_LOST_REASON_MAX_ENUM);
- break;
case RENDER_COMPOSITOR_CONTEXT:
UMA_HISTOGRAM_ENUMERATION("GPU.ContextLost.RenderCompositor", reason,
CONTEXT_LOST_REASON_MAX_ENUM);
@@ -124,8 +120,6 @@ std::string CommandBufferContextTypeToString(CommandBufferContextType type) {
return "Compositor";
case BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT:
return "Offscreen-MainThread";
- case BROWSER_WORKER_CONTEXT:
- return "CompositorWorker";
case RENDER_COMPOSITOR_CONTEXT:
return "RenderCompositor";
case RENDER_WORKER_CONTEXT:
diff --git a/content/common/gpu/client/command_buffer_metrics.h b/content/common/gpu/client/command_buffer_metrics.h
index 0b4790c..e198d85 100644
--- a/content/common/gpu/client/command_buffer_metrics.h
+++ b/content/common/gpu/client/command_buffer_metrics.h
@@ -14,7 +14,6 @@ namespace content {
enum CommandBufferContextType {
BROWSER_COMPOSITOR_ONSCREEN_CONTEXT,
BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT,
- BROWSER_WORKER_CONTEXT,
RENDER_COMPOSITOR_CONTEXT,
RENDER_WORKER_CONTEXT,
RENDERER_MAINTHREAD_CONTEXT,
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index 705937a..f69dc63 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -470,11 +470,6 @@ void RenderWidgetCompositor::Initialize() {
settings.use_external_begin_frame_source = false;
}
- settings.max_staging_buffers = 32;
- // Use 1/4th of staging buffers on low-end devices.
- if (base::SysInfo::IsLowEndDevice())
- settings.max_staging_buffers /= 4;
-
scoped_refptr<base::SingleThreadTaskRunner> compositor_thread_task_runner =
compositor_deps_->GetCompositorImplThreadTaskRunner();
scoped_refptr<base::SingleThreadTaskRunner>