Revert of Revert of Allow creating context for cc worker thread. (patchset #1 id:1 of https://codereview.chromium.org/915523003/)
Reason for revert:
Let's try relanding this again, this time with clobber on mac builder if required -- the change actually looks fine.
Original issue's description:
> Revert of Allow creating context for cc worker thread. (patchset #5 id:80001 of https://codereview.chromium.org/898453007/)
>
> Reason for revert:
> Broke libcontent.dylib build on mac debug builder: http://build.chromium.org/p/chromium.webkit/builders/Mac%20Builder%20%28dbg%29/builds/74405/steps/compile/logs/stdio
>
> Original issue's description:
> > Allow creating context for cc worker thread.
> >
> > An additional context can be provided by the OutputSurface. This will be used for cc/ to create a context on its worker thread.
> >
> > Committed: https://crrev.com/3702467b0a7c261bdf8700597c76e51dc39a449c
> > Cr-Commit-Position: refs/heads/master@{#315469}
>
> [email protected],[email protected]
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/66b36fff67a845406d7a2addd0a5f5cd729cb0df
> Cr-Commit-Position: refs/heads/master@{#315552}
[email protected],[email protected]
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/908853007
Cr-Commit-Position: refs/heads/master@{#315561}
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 1b29380..4ec16f2 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1004,23 +1004,17 @@
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, nullptr,
+ 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, nullptr, nullptr,
+ software_device.Pass(), frame_swap_message_queue_, true));
}
if (command_line.HasSwitch(cc::switches::kCompositeToMailbox)) {
@@ -1031,22 +1025,16 @@
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, nullptr,
+ 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, nullptr,
+ scoped_ptr<cc::SoftwareOutputDevice>(), frame_swap_message_queue_,
+ use_swap_compositor_frame_message));
}
void RenderWidget::OnSwapBuffersAborted() {