| 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/debug/trace_event_synthetic_delay.h" | 10 #include "base/debug/trace_event_synthetic_delay.h" |
| (...skipping 2762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2773 max_transfer_buffer_usage_mb * kBytesPerMegabyte; | 2773 max_transfer_buffer_usage_mb * kBytesPerMegabyte; |
| 2774 #endif | 2774 #endif |
| 2775 | 2775 |
| 2776 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( | 2776 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( |
| 2777 new WebGraphicsContext3DCommandBufferImpl( | 2777 new WebGraphicsContext3DCommandBufferImpl( |
| 2778 surface_id(), | 2778 surface_id(), |
| 2779 GetURLForGraphicsContext3D(), | 2779 GetURLForGraphicsContext3D(), |
| 2780 gpu_channel_host.get(), | 2780 gpu_channel_host.get(), |
| 2781 attributes, | 2781 attributes, |
| 2782 false /* bind generates resources */, | 2782 false /* bind generates resources */, |
| 2783 limits)); | 2783 limits, |
| 2784 NULL)); |
| 2784 return context.Pass(); | 2785 return context.Pass(); |
| 2785 } | 2786 } |
| 2786 | 2787 |
| 2787 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2788 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
| 2788 swapped_out_frames_.AddObserver(frame); | 2789 swapped_out_frames_.AddObserver(frame); |
| 2789 } | 2790 } |
| 2790 | 2791 |
| 2791 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2792 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
| 2792 swapped_out_frames_.RemoveObserver(frame); | 2793 swapped_out_frames_.RemoveObserver(frame); |
| 2793 } | 2794 } |
| 2794 | 2795 |
| 2795 } // namespace content | 2796 } // namespace content |
| OLD | NEW |