| Index: content/renderer/render_widget.cc
|
| diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
|
| index 85558ef99e3a9d45a0e55648c4370cd0085fa236..ba54a00e21bd2614cee901ec2bdc611b608b6bac 100644
|
| --- a/content/renderer/render_widget.cc
|
| +++ b/content/renderer/render_widget.cc
|
| @@ -916,8 +916,25 @@
|
|
|
| scoped_refptr<ContextProviderCommandBuffer> context_provider;
|
| if (!use_software) {
|
| + // Explicitly disable antialiasing for the compositor. As of the time of
|
| + // this writing, the only platform that supported antialiasing for the
|
| + // compositor was Mac OS X, because the on-screen OpenGL context creation
|
| + // code paths on Windows and Linux didn't yet have multisampling support.
|
| + // Mac OS X essentially always behaves as though it's rendering offscreen.
|
| + // Multisampling has a heavy cost especially on devices with relatively low
|
| + // fill rate like most notebooks, and the Mac implementation would need to
|
| + // be optimized to resolve directly into the IOSurface shared between the
|
| + // GPU and browser processes. For these reasons and to avoid platform
|
| + // disparities we explicitly disable antialiasing.
|
| + blink::WebGraphicsContext3D::Attributes attributes;
|
| + attributes.antialias = false;
|
| + attributes.shareResources = true;
|
| + attributes.noAutomaticFlushes = true;
|
| + attributes.depth = false;
|
| + attributes.stencil = false;
|
| context_provider = ContextProviderCommandBuffer::Create(
|
| - CreateGraphicsContext3D(), "RenderCompositor");
|
| + CreateGraphicsContext3D(attributes),
|
| + "RenderCompositor");
|
| if (!context_provider.get()) {
|
| // Cause the compositor to wait and try again.
|
| return scoped_ptr<cc::OutputSurface>();
|
| @@ -2817,7 +2834,8 @@
|
| }
|
|
|
| scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
|
| -RenderWidget::CreateGraphicsContext3D() {
|
| +RenderWidget::CreateGraphicsContext3D(
|
| + const blink::WebGraphicsContext3D::Attributes& attributes) {
|
| if (!webwidget_)
|
| return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>();
|
| if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| @@ -2832,24 +2850,6 @@
|
| if (!gpu_channel_host)
|
| return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>();
|
|
|
| - // Explicitly disable antialiasing for the compositor. As of the time of
|
| - // this writing, the only platform that supported antialiasing for the
|
| - // compositor was Mac OS X, because the on-screen OpenGL context creation
|
| - // code paths on Windows and Linux didn't yet have multisampling support.
|
| - // Mac OS X essentially always behaves as though it's rendering offscreen.
|
| - // Multisampling has a heavy cost especially on devices with relatively low
|
| - // fill rate like most notebooks, and the Mac implementation would need to
|
| - // be optimized to resolve directly into the IOSurface shared between the
|
| - // GPU and browser processes. For these reasons and to avoid platform
|
| - // disparities we explicitly disable antialiasing.
|
| - blink::WebGraphicsContext3D::Attributes attributes;
|
| - attributes.antialias = false;
|
| - attributes.shareResources = true;
|
| - attributes.noAutomaticFlushes = true;
|
| - attributes.depth = false;
|
| - attributes.stencil = false;
|
| - bool bind_generates_resources = false;
|
| - bool lose_context_when_out_of_memory = true;
|
| WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits;
|
| #if defined(OS_ANDROID)
|
| // If we raster too fast we become upload bound, and pending
|
| @@ -2875,14 +2875,14 @@
|
| #endif
|
|
|
| scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(
|
| - new WebGraphicsContext3DCommandBufferImpl(surface_id(),
|
| - GetURLForGraphicsContext3D(),
|
| - gpu_channel_host.get(),
|
| - attributes,
|
| - bind_generates_resources,
|
| - lose_context_when_out_of_memory,
|
| - limits,
|
| - NULL));
|
| + new WebGraphicsContext3DCommandBufferImpl(
|
| + surface_id(),
|
| + GetURLForGraphicsContext3D(),
|
| + gpu_channel_host.get(),
|
| + attributes,
|
| + false /* bind generates resources */,
|
| + limits,
|
| + NULL));
|
| return context.Pass();
|
| }
|
|
|
|
|