OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 void WebPopupMenuImpl::enterForceCompositingMode(bool enter) | 206 void WebPopupMenuImpl::enterForceCompositingMode(bool enter) |
207 { | 207 { |
208 if (m_isAcceleratedCompositingActive == enter) | 208 if (m_isAcceleratedCompositingActive == enter) |
209 return; | 209 return; |
210 | 210 |
211 if (!enter) { | 211 if (!enter) { |
212 m_isAcceleratedCompositingActive = false; | 212 m_isAcceleratedCompositingActive = false; |
213 m_client->didDeactivateCompositor(); | 213 m_client->didDeactivateCompositor(); |
214 } else if (m_layerTreeView) { | 214 } else if (m_layerTreeView) { |
215 m_isAcceleratedCompositingActive = true; | 215 m_isAcceleratedCompositingActive = true; |
216 m_client->didActivateCompositor(0); | 216 m_client->didActivateCompositor(); |
217 } else { | 217 } else { |
218 TRACE_EVENT0("webkit", "WebPopupMenuImpl::enterForceCompositingMode(true
)"); | 218 TRACE_EVENT0("webkit", "WebPopupMenuImpl::enterForceCompositingMode(true
)"); |
219 | 219 |
220 m_client->initializeLayerTreeView(); | 220 m_client->initializeLayerTreeView(); |
221 m_layerTreeView = m_client->layerTreeView(); | 221 m_layerTreeView = m_client->layerTreeView(); |
222 if (m_layerTreeView) { | 222 if (m_layerTreeView) { |
223 m_layerTreeView->setVisible(true); | 223 m_layerTreeView->setVisible(true); |
224 m_client->didActivateCompositor(0); | 224 m_client->didActivateCompositor(); |
225 m_isAcceleratedCompositingActive = true; | 225 m_isAcceleratedCompositingActive = true; |
226 m_layerTreeView->setDeviceScaleFactor(m_client->deviceScaleFactor())
; | 226 m_layerTreeView->setDeviceScaleFactor(m_client->deviceScaleFactor())
; |
227 m_rootLayer = adoptPtr(Platform::current()->compositorSupport()->cre
ateContentLayer(this)); | 227 m_rootLayer = adoptPtr(Platform::current()->compositorSupport()->cre
ateContentLayer(this)); |
228 m_rootLayer->layer()->setBounds(m_size); | 228 m_rootLayer->layer()->setBounds(m_size); |
229 m_layerTreeView->setRootLayer(*m_rootLayer->layer()); | 229 m_layerTreeView->setRootLayer(*m_rootLayer->layer()); |
230 } else { | 230 } else { |
231 m_isAcceleratedCompositingActive = false; | 231 m_isAcceleratedCompositingActive = false; |
232 m_client->didDeactivateCompositor(); | 232 m_client->didDeactivateCompositor(); |
233 } | 233 } |
234 } | 234 } |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 ASSERT(widget == m_widget); | 444 ASSERT(widget == m_widget); |
445 if (m_widget) { | 445 if (m_widget) { |
446 m_widget->setClient(0); | 446 m_widget->setClient(0); |
447 m_widget = 0; | 447 m_widget = 0; |
448 } | 448 } |
449 if (m_client) | 449 if (m_client) |
450 m_client->closeWidgetSoon(); | 450 m_client->closeWidgetSoon(); |
451 } | 451 } |
452 | 452 |
453 } // namespace blink | 453 } // namespace blink |
OLD | NEW |