| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 void WebPagePopupImpl::setIsAcceleratedCompositingActive(bool enter) | 257 void WebPagePopupImpl::setIsAcceleratedCompositingActive(bool enter) |
| 258 { | 258 { |
| 259 if (m_isAcceleratedCompositingActive == enter) | 259 if (m_isAcceleratedCompositingActive == enter) |
| 260 return; | 260 return; |
| 261 | 261 |
| 262 if (!enter) { | 262 if (!enter) { |
| 263 m_isAcceleratedCompositingActive = false; | 263 m_isAcceleratedCompositingActive = false; |
| 264 m_widgetClient->didDeactivateCompositor(); | 264 m_widgetClient->didDeactivateCompositor(); |
| 265 } else if (m_layerTreeView) { | 265 } else if (m_layerTreeView) { |
| 266 m_isAcceleratedCompositingActive = true; | 266 m_isAcceleratedCompositingActive = true; |
| 267 m_widgetClient->didActivateCompositor(0); | 267 m_widgetClient->didActivateCompositor(); |
| 268 } else { | 268 } else { |
| 269 TRACE_EVENT0("webkit", "WebPagePopupImpl::setIsAcceleratedCompositingAct
ive(true)"); | 269 TRACE_EVENT0("webkit", "WebPagePopupImpl::setIsAcceleratedCompositingAct
ive(true)"); |
| 270 | 270 |
| 271 m_widgetClient->initializeLayerTreeView(); | 271 m_widgetClient->initializeLayerTreeView(); |
| 272 m_layerTreeView = m_widgetClient->layerTreeView(); | 272 m_layerTreeView = m_widgetClient->layerTreeView(); |
| 273 if (m_layerTreeView) { | 273 if (m_layerTreeView) { |
| 274 m_layerTreeView->setVisible(true); | 274 m_layerTreeView->setVisible(true); |
| 275 m_widgetClient->didActivateCompositor(0); | 275 m_widgetClient->didActivateCompositor(); |
| 276 m_isAcceleratedCompositingActive = true; | 276 m_isAcceleratedCompositingActive = true; |
| 277 m_layerTreeView->setDeviceScaleFactor(m_widgetClient->deviceScaleFac
tor()); | 277 m_layerTreeView->setDeviceScaleFactor(m_widgetClient->deviceScaleFac
tor()); |
| 278 } else { | 278 } else { |
| 279 m_isAcceleratedCompositingActive = false; | 279 m_isAcceleratedCompositingActive = false; |
| 280 m_widgetClient->didDeactivateCompositor(); | 280 m_widgetClient->didDeactivateCompositor(); |
| 281 } | 281 } |
| 282 } | 282 } |
| 283 } | 283 } |
| 284 | 284 |
| 285 WebSize WebPagePopupImpl::size() | 285 WebSize WebPagePopupImpl::size() |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 // A WebPagePopupImpl instance usually has two references. | 426 // A WebPagePopupImpl instance usually has two references. |
| 427 // - One owned by the instance itself. It represents the visible widget. | 427 // - One owned by the instance itself. It represents the visible widget. |
| 428 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the | 428 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 429 // WebPagePopupImpl to close. | 429 // WebPagePopupImpl to close. |
| 430 // We need them because the closing operation is asynchronous and the widget | 430 // We need them because the closing operation is asynchronous and the widget |
| 431 // can be closed while the WebViewImpl is unaware of it. | 431 // can be closed while the WebViewImpl is unaware of it. |
| 432 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 432 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 433 } | 433 } |
| 434 | 434 |
| 435 } // namespace blink | 435 } // namespace blink |
| OLD | NEW |