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/bind.h" | 10 #include "base/bind.h" |
(...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1953 WebGraphicsContext3D* context = CreateGraphicsContext3D(attributes); | 1953 WebGraphicsContext3D* context = CreateGraphicsContext3D(attributes); |
1954 if (!context) | 1954 if (!context) |
1955 return NULL; | 1955 return NULL; |
1956 | 1956 |
1957 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 1957 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
1958 if (command_line.HasSwitch(switches::kEnableSoftwareCompositingGLAdapter)) { | 1958 if (command_line.HasSwitch(switches::kEnableSoftwareCompositingGLAdapter)) { |
1959 // In the absence of a software-based delegating renderer, use this | 1959 // In the absence of a software-based delegating renderer, use this |
1960 // stopgap adapter class to present the software renderer output using a | 1960 // stopgap adapter class to present the software renderer output using a |
1961 // 3d context. | 1961 // 3d context. |
1962 return new CompositorOutputSurface(routing_id(), NULL, | 1962 return new CompositorOutputSurface(routing_id(), NULL, |
1963 new CompositorSoftwareOutputDeviceGLAdapter(context)); | 1963 new CompositorSoftwareOutputDeviceGLAdapter(context), false); |
1964 } else { | 1964 } else { |
1965 return new CompositorOutputSurface(routing_id(), context, NULL); | 1965 bool composite_to_mailbox = |
| 1966 command_line.HasSwitch(cc::switches::kCompositeToMailbox); |
| 1967 DCHECK(!composite_to_mailbox || command_line.HasSwitch( |
| 1968 cc::switches::kEnableCompositorFrameMessage)); |
| 1969 return new CompositorOutputSurface( |
| 1970 routing_id(), context, NULL, composite_to_mailbox); |
1966 } | 1971 } |
1967 } | 1972 } |
1968 | 1973 |
1969 void RenderViewImpl::didAddMessageToConsole( | 1974 void RenderViewImpl::didAddMessageToConsole( |
1970 const WebConsoleMessage& message, const WebString& source_name, | 1975 const WebConsoleMessage& message, const WebString& source_name, |
1971 unsigned source_line) { | 1976 unsigned source_line) { |
1972 logging::LogSeverity log_severity = logging::LOG_VERBOSE; | 1977 logging::LogSeverity log_severity = logging::LOG_VERBOSE; |
1973 switch (message.level) { | 1978 switch (message.level) { |
1974 case WebConsoleMessage::LevelTip: | 1979 case WebConsoleMessage::LevelTip: |
1975 log_severity = logging::LOG_VERBOSE; | 1980 log_severity = logging::LOG_VERBOSE; |
(...skipping 4609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6585 } | 6590 } |
6586 #endif | 6591 #endif |
6587 | 6592 |
6588 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6593 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
6589 TransportDIB::Handle dib_handle) { | 6594 TransportDIB::Handle dib_handle) { |
6590 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6595 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
6591 RenderProcess::current()->ReleaseTransportDIB(dib); | 6596 RenderProcess::current()->ReleaseTransportDIB(dib); |
6592 } | 6597 } |
6593 | 6598 |
6594 } // namespace content | 6599 } // namespace content |
OLD | NEW |