| Index: content/renderer/render_widget.cc
|
| diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
|
| index d9dbe21ce1cbb745540202a7b985521962c3e388..4faf4bdcc40b3a83052ee2e90bcb9f37db947cdf 100644
|
| --- a/content/renderer/render_widget.cc
|
| +++ b/content/renderer/render_widget.cc
|
| @@ -993,6 +993,7 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(bool fallback) {
|
| use_software = true;
|
|
|
| scoped_refptr<ContextProviderCommandBuffer> context_provider;
|
| + scoped_refptr<ContextProviderCommandBuffer> worker_context_provider;
|
| if (!use_software) {
|
| context_provider = ContextProviderCommandBuffer::Create(
|
| CreateGraphicsContext3D(), "RenderCompositor");
|
| @@ -1000,28 +1001,30 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(bool fallback) {
|
| // Cause the compositor to wait and try again.
|
| return scoped_ptr<cc::OutputSurface>();
|
| }
|
| +
|
| + worker_context_provider = ContextProviderCommandBuffer::Create(
|
| + CreateGraphicsContext3D(), "RenderWorker");
|
| + if (!worker_context_provider.get()) {
|
| + // Cause the compositor to wait and try again.
|
| + LOG(ERROR) << "Failed to create worker context provider!!!!!!!!!";
|
| + return scoped_ptr<cc::OutputSurface>();
|
| + }
|
| }
|
|
|
| uint32 output_surface_id = next_output_surface_id_++;
|
| if (command_line.HasSwitch(switches::kEnableDelegatedRenderer)) {
|
| DCHECK(compositor_deps_->GetCompositorImplThreadTaskRunner());
|
| - return scoped_ptr<cc::OutputSurface>(
|
| - new DelegatedCompositorOutputSurface(routing_id(),
|
| - output_surface_id,
|
| - context_provider,
|
| - frame_swap_message_queue_));
|
| + return scoped_ptr<cc::OutputSurface>(new DelegatedCompositorOutputSurface(
|
| + routing_id(), output_surface_id, context_provider,
|
| + worker_context_provider, frame_swap_message_queue_));
|
| }
|
| if (!context_provider.get()) {
|
| scoped_ptr<cc::SoftwareOutputDevice> software_device(
|
| new CompositorSoftwareOutputDevice());
|
|
|
| - return scoped_ptr<cc::OutputSurface>(
|
| - new CompositorOutputSurface(routing_id(),
|
| - output_surface_id,
|
| - NULL,
|
| - software_device.Pass(),
|
| - frame_swap_message_queue_,
|
| - true));
|
| + return scoped_ptr<cc::OutputSurface>(new CompositorOutputSurface(
|
| + routing_id(), output_surface_id, NULL, NULL, software_device.Pass(),
|
| + frame_swap_message_queue_, true));
|
| }
|
|
|
| if (command_line.HasSwitch(cc::switches::kCompositeToMailbox)) {
|
| @@ -1032,22 +1035,16 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(bool fallback) {
|
| cc::ResourceFormat format = cc::RGBA_8888;
|
| if (base::SysInfo::IsLowEndDevice())
|
| format = cc::RGB_565;
|
| - return scoped_ptr<cc::OutputSurface>(
|
| - new MailboxOutputSurface(routing_id(),
|
| - output_surface_id,
|
| - context_provider,
|
| - scoped_ptr<cc::SoftwareOutputDevice>(),
|
| - frame_swap_message_queue_,
|
| - format));
|
| + return scoped_ptr<cc::OutputSurface>(new MailboxOutputSurface(
|
| + routing_id(), output_surface_id, context_provider,
|
| + worker_context_provider, scoped_ptr<cc::SoftwareOutputDevice>(),
|
| + frame_swap_message_queue_, format));
|
| }
|
| bool use_swap_compositor_frame_message = false;
|
| - return scoped_ptr<cc::OutputSurface>(
|
| - new CompositorOutputSurface(routing_id(),
|
| - output_surface_id,
|
| - context_provider,
|
| - scoped_ptr<cc::SoftwareOutputDevice>(),
|
| - frame_swap_message_queue_,
|
| - use_swap_compositor_frame_message));
|
| + return scoped_ptr<cc::OutputSurface>(new CompositorOutputSurface(
|
| + routing_id(), output_surface_id, context_provider,
|
| + worker_context_provider, scoped_ptr<cc::SoftwareOutputDevice>(),
|
| + frame_swap_message_queue_, use_swap_compositor_frame_message));
|
| }
|
|
|
| void RenderWidget::OnSwapBuffersAborted() {
|
|
|