Chromium Code Reviews| 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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 930 !command_line.HasSwitch(switches::kDisableDelegatedRenderer)) { | 930 !command_line.HasSwitch(switches::kDisableDelegatedRenderer)) { |
| 931 DCHECK(is_threaded_compositing_enabled_); | 931 DCHECK(is_threaded_compositing_enabled_); |
| 932 return scoped_ptr<cc::OutputSurface>( | 932 return scoped_ptr<cc::OutputSurface>( |
| 933 new DelegatedCompositorOutputSurface( | 933 new DelegatedCompositorOutputSurface( |
| 934 routing_id(), | 934 routing_id(), |
| 935 output_surface_id, | 935 output_surface_id, |
| 936 context_provider, | 936 context_provider, |
| 937 scoped_ptr<cc::SoftwareOutputDevice>())); | 937 scoped_ptr<cc::SoftwareOutputDevice>())); |
| 938 } | 938 } |
| 939 if (command_line.HasSwitch(cc::switches::kCompositeToMailbox)) { | 939 if (command_line.HasSwitch(cc::switches::kCompositeToMailbox)) { |
| 940 DCHECK(is_threaded_compositing_enabled_); | |
|
jamesr
2014/02/07 20:43:49
can you modify this to DCHECK that we're either in
danakj
2014/02/07 20:48:06
Done.
| |
| 941 cc::ResourceFormat format = cc::RGBA_8888; | 940 cc::ResourceFormat format = cc::RGBA_8888; |
| 942 #if defined(OS_ANDROID) | 941 #if defined(OS_ANDROID) |
| 943 if (base::android::SysUtils::IsLowEndDevice()) | 942 if (base::android::SysUtils::IsLowEndDevice()) |
| 944 format = cc::RGB_565; | 943 format = cc::RGB_565; |
| 945 #endif | 944 #endif |
| 946 return scoped_ptr<cc::OutputSurface>( | 945 return scoped_ptr<cc::OutputSurface>( |
| 947 new MailboxOutputSurface( | 946 new MailboxOutputSurface( |
| 948 routing_id(), | 947 routing_id(), |
| 949 output_surface_id, | 948 output_surface_id, |
| 950 context_provider, | 949 context_provider, |
| (...skipping 1917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2868 | 2867 |
| 2869 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2868 void RenderWidget::RegisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
| 2870 swapped_out_frames_.AddObserver(frame); | 2869 swapped_out_frames_.AddObserver(frame); |
| 2871 } | 2870 } |
| 2872 | 2871 |
| 2873 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { | 2872 void RenderWidget::UnregisterSwappedOutChildFrame(RenderFrameImpl* frame) { |
| 2874 swapped_out_frames_.RemoveObserver(frame); | 2873 swapped_out_frames_.RemoveObserver(frame); |
| 2875 } | 2874 } |
| 2876 | 2875 |
| 2877 } // namespace content | 2876 } // namespace content |
| OLD | NEW |