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_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 #include "content/renderer/disambiguation_popup_helper.h" | 76 #include "content/renderer/disambiguation_popup_helper.h" |
| 77 #include "content/renderer/do_not_track_bindings.h" | 77 #include "content/renderer/do_not_track_bindings.h" |
| 78 #include "content/renderer/dom_automation_controller.h" | 78 #include "content/renderer/dom_automation_controller.h" |
| 79 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 79 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
| 80 #include "content/renderer/external_popup_menu.h" | 80 #include "content/renderer/external_popup_menu.h" |
| 81 #include "content/renderer/favicon_helper.h" | 81 #include "content/renderer/favicon_helper.h" |
| 82 #include "content/renderer/geolocation_dispatcher.h" | 82 #include "content/renderer/geolocation_dispatcher.h" |
| 83 #include "content/renderer/gpu/compositor_output_surface.h" | 83 #include "content/renderer/gpu/compositor_output_surface.h" |
| 84 #include "content/renderer/gpu/compositor_software_output_device_gl_adapter.h" | 84 #include "content/renderer/gpu/compositor_software_output_device_gl_adapter.h" |
| 85 #include "content/renderer/gpu/compositor_thread.h" | 85 #include "content/renderer/gpu/compositor_thread.h" |
| 86 #include "content/renderer/gpu/mailbox_output_surface.h" | |
| 86 #include "content/renderer/gpu/render_widget_compositor.h" | 87 #include "content/renderer/gpu/render_widget_compositor.h" |
| 87 #include "content/renderer/idle_user_detector.h" | 88 #include "content/renderer/idle_user_detector.h" |
| 88 #include "content/renderer/input_tag_speech_dispatcher.h" | 89 #include "content/renderer/input_tag_speech_dispatcher.h" |
| 89 #include "content/renderer/java/java_bridge_dispatcher.h" | 90 #include "content/renderer/java/java_bridge_dispatcher.h" |
| 90 #include "content/renderer/load_progress_tracker.h" | 91 #include "content/renderer/load_progress_tracker.h" |
| 91 #include "content/renderer/media/audio_device_factory.h" | 92 #include "content/renderer/media/audio_device_factory.h" |
| 92 #include "content/renderer/media/audio_renderer_mixer_manager.h" | 93 #include "content/renderer/media/audio_renderer_mixer_manager.h" |
| 93 #include "content/renderer/media/media_stream_dependency_factory.h" | 94 #include "content/renderer/media/media_stream_dependency_factory.h" |
| 94 #include "content/renderer/media/media_stream_dispatcher.h" | 95 #include "content/renderer/media/media_stream_dispatcher.h" |
| 95 #include "content/renderer/media/media_stream_impl.h" | 96 #include "content/renderer/media/media_stream_impl.h" |
| (...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2034 | 2035 |
| 2035 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 2036 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 2036 if (command_line.HasSwitch(switches::kEnableSoftwareCompositingGLAdapter)) { | 2037 if (command_line.HasSwitch(switches::kEnableSoftwareCompositingGLAdapter)) { |
| 2037 // In the absence of a software-based delegating renderer, use this | 2038 // In the absence of a software-based delegating renderer, use this |
| 2038 // stopgap adapter class to present the software renderer output using a | 2039 // stopgap adapter class to present the software renderer output using a |
| 2039 // 3d context. | 2040 // 3d context. |
| 2040 return scoped_ptr<cc::OutputSurface>( | 2041 return scoped_ptr<cc::OutputSurface>( |
| 2041 new CompositorOutputSurface(routing_id(), NULL, | 2042 new CompositorOutputSurface(routing_id(), NULL, |
| 2042 new CompositorSoftwareOutputDeviceGLAdapter(context))); | 2043 new CompositorSoftwareOutputDeviceGLAdapter(context))); |
| 2043 } else { | 2044 } else { |
| 2044 return scoped_ptr<cc::OutputSurface>( | 2045 bool composite_to_mailbox = |
| 2045 new CompositorOutputSurface(routing_id(), context, NULL)); | 2046 command_line.HasSwitch(cc::switches::kCompositeToMailbox); |
| 2047 DCHECK(!composite_to_mailbox || command_line.HasSwitch( | |
| 2048 cc::switches::kEnableCompositorFrameMessage)); | |
|
piman
2013/02/27 23:51:04
Could we instead make sure settings.compositorFram
no sievers
2013/02/28 18:43:40
I'd rather remove kEnableCompositorFrameMessage so
piman
2013/02/28 19:30:31
As long as we come back and clean this soon, ok.
| |
| 2049 // No swap throttling yet when compositing on the main thread. | |
| 2050 DCHECK(!composite_to_mailbox || is_threaded_compositing_enabled_); | |
| 2051 return scoped_ptr<cc::OutputSurface>(composite_to_mailbox ? | |
| 2052 new MailboxOutputSurface(routing_id(), context, NULL) : | |
| 2053 new CompositorOutputSurface(routing_id(), context, NULL)); | |
| 2046 } | 2054 } |
| 2047 } | 2055 } |
| 2048 | 2056 |
| 2049 void RenderViewImpl::didAddMessageToConsole( | 2057 void RenderViewImpl::didAddMessageToConsole( |
| 2050 const WebConsoleMessage& message, const WebString& source_name, | 2058 const WebConsoleMessage& message, const WebString& source_name, |
| 2051 unsigned source_line) { | 2059 unsigned source_line) { |
| 2052 logging::LogSeverity log_severity = logging::LOG_VERBOSE; | 2060 logging::LogSeverity log_severity = logging::LOG_VERBOSE; |
| 2053 switch (message.level) { | 2061 switch (message.level) { |
| 2054 case WebConsoleMessage::LevelDebug: | 2062 case WebConsoleMessage::LevelDebug: |
| 2055 log_severity = logging::LOG_VERBOSE; | 2063 log_severity = logging::LOG_VERBOSE; |
| (...skipping 4648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6704 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6712 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6705 RenderProcess::current()->ReleaseTransportDIB(dib); | 6713 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6706 } | 6714 } |
| 6707 | 6715 |
| 6708 void RenderViewImpl::DidCommitCompositorFrame() { | 6716 void RenderViewImpl::DidCommitCompositorFrame() { |
| 6709 RenderWidget::DidCommitCompositorFrame(); | 6717 RenderWidget::DidCommitCompositorFrame(); |
| 6710 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); | 6718 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); |
| 6711 } | 6719 } |
| 6712 | 6720 |
| 6713 } // namespace content | 6721 } // namespace content |
| OLD | NEW |