Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: Source/web/WebPagePopupImpl.cpp

Issue 298803009: Remove no-op did(De)activateCompositor calls (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/web/WebPopupMenuImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 } 259 }
260 } 260 }
261 261
262 void WebPagePopupImpl::setIsAcceleratedCompositingActive(bool enter) 262 void WebPagePopupImpl::setIsAcceleratedCompositingActive(bool enter)
263 { 263 {
264 if (m_isAcceleratedCompositingActive == enter) 264 if (m_isAcceleratedCompositingActive == enter)
265 return; 265 return;
266 266
267 if (!enter) { 267 if (!enter) {
268 m_isAcceleratedCompositingActive = false; 268 m_isAcceleratedCompositingActive = false;
269 m_widgetClient->didDeactivateCompositor();
270 } else if (m_layerTreeView) { 269 } else if (m_layerTreeView) {
271 m_isAcceleratedCompositingActive = true; 270 m_isAcceleratedCompositingActive = true;
272 m_widgetClient->didActivateCompositor();
273 } else { 271 } else {
274 TRACE_EVENT0("webkit", "WebPagePopupImpl::setIsAcceleratedCompositingAct ive(true)"); 272 TRACE_EVENT0("webkit", "WebPagePopupImpl::setIsAcceleratedCompositingAct ive(true)");
275 273
276 m_widgetClient->initializeLayerTreeView(); 274 m_widgetClient->initializeLayerTreeView();
277 m_layerTreeView = m_widgetClient->layerTreeView(); 275 m_layerTreeView = m_widgetClient->layerTreeView();
278 if (m_layerTreeView) { 276 if (m_layerTreeView) {
279 m_layerTreeView->setVisible(true); 277 m_layerTreeView->setVisible(true);
280 m_widgetClient->didActivateCompositor();
281 m_isAcceleratedCompositingActive = true; 278 m_isAcceleratedCompositingActive = true;
282 m_layerTreeView->setDeviceScaleFactor(m_widgetClient->deviceScaleFac tor()); 279 m_layerTreeView->setDeviceScaleFactor(m_widgetClient->deviceScaleFac tor());
283 } else { 280 } else {
284 m_isAcceleratedCompositingActive = false; 281 m_isAcceleratedCompositingActive = false;
285 m_widgetClient->didDeactivateCompositor();
286 } 282 }
287 } 283 }
288 } 284 }
289 285
290 WebSize WebPagePopupImpl::size() 286 WebSize WebPagePopupImpl::size()
291 { 287 {
292 return m_popupClient->contentSize(); 288 return m_popupClient->contentSize();
293 } 289 }
294 290
295 void WebPagePopupImpl::animate(double) 291 void WebPagePopupImpl::animate(double)
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 // A WebPagePopupImpl instance usually has two references. 402 // A WebPagePopupImpl instance usually has two references.
407 // - One owned by the instance itself. It represents the visible widget. 403 // - One owned by the instance itself. It represents the visible widget.
408 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 404 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
409 // WebPagePopupImpl to close. 405 // WebPagePopupImpl to close.
410 // We need them because the closing operation is asynchronous and the widget 406 // We need them because the closing operation is asynchronous and the widget
411 // can be closed while the WebViewImpl is unaware of it. 407 // can be closed while the WebViewImpl is unaware of it.
412 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 408 return adoptRef(new WebPagePopupImpl(client)).leakRef();
413 } 409 }
414 410
415 } // namespace blink 411 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/web/WebPopupMenuImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698