| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 GURL RenderWidget::GetURLForGraphicsContext3D() { | 549 GURL RenderWidget::GetURLForGraphicsContext3D() { |
| 550 return GURL(); | 550 return GURL(); |
| 551 } | 551 } |
| 552 | 552 |
| 553 bool RenderWidget::ForceCompositingModeEnabled() { | 553 bool RenderWidget::ForceCompositingModeEnabled() { |
| 554 return false; | 554 return false; |
| 555 } | 555 } |
| 556 | 556 |
| 557 scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface() { | 557 scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface() { |
| 558 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 558 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 559 if (command_line.HasSwitch(switches::kEnableSoftwareCompositingGLAdapter)) { | 559 if (command_line.HasSwitch(switches::kDisableGpu)) { |
| 560 return scoped_ptr<cc::OutputSurface>( | 560 return scoped_ptr<cc::OutputSurface>( |
| 561 new CompositorOutputSurface(routing_id(), NULL, | 561 new CompositorOutputSurface(routing_id(), NULL, |
| 562 new CompositorSoftwareOutputDevice())); | 562 new CompositorSoftwareOutputDevice())); |
| 563 } | 563 } |
| 564 | 564 |
| 565 // Explicitly disable antialiasing for the compositor. As of the time of | 565 // Explicitly disable antialiasing for the compositor. As of the time of |
| 566 // this writing, the only platform that supported antialiasing for the | 566 // this writing, the only platform that supported antialiasing for the |
| 567 // compositor was Mac OS X, because the on-screen OpenGL context creation | 567 // compositor was Mac OS X, because the on-screen OpenGL context creation |
| 568 // code paths on Windows and Linux didn't yet have multisampling support. | 568 // code paths on Windows and Linux didn't yet have multisampling support. |
| 569 // Mac OS X essentially always behaves as though it's rendering offscreen. | 569 // Mac OS X essentially always behaves as though it's rendering offscreen. |
| (...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2315 | 2315 |
| 2316 if (!context->Initialize( | 2316 if (!context->Initialize( |
| 2317 attributes, | 2317 attributes, |
| 2318 false /* bind generates resources */, | 2318 false /* bind generates resources */, |
| 2319 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) | 2319 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)
) |
| 2320 return NULL; | 2320 return NULL; |
| 2321 return context.release(); | 2321 return context.release(); |
| 2322 } | 2322 } |
| 2323 | 2323 |
| 2324 } // namespace content | 2324 } // namespace content |
| OLD | NEW |