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

Unified Diff: Source/web/WebPopupMenuImpl.cpp

Issue 304273002: Remove WebPopupMenuImpl::enterForceCompositingMode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebPopupMenuImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebPopupMenuImpl.cpp
diff --git a/Source/web/WebPopupMenuImpl.cpp b/Source/web/WebPopupMenuImpl.cpp
index 3a9134d708df741f1a82c70525529691308c6f0a..04cfcc5914bb849672ec295c276b0e90f6fd3ff0 100644
--- a/Source/web/WebPopupMenuImpl.cpp
+++ b/Source/web/WebPopupMenuImpl.cpp
@@ -74,7 +74,6 @@ WebPopupMenu* WebPopupMenu::create(WebWidgetClient* client)
WebPopupMenuImpl::WebPopupMenuImpl(WebWidgetClient* client)
: m_client(client)
, m_layerTreeView(0)
- , m_isAcceleratedCompositingActive(false)
// Set to impossible point so we always get the first mouse position.
, m_lastMousePosition(WebPoint(-1, -1))
, m_widget(0)
@@ -89,7 +88,6 @@ WebPopupMenuImpl::~WebPopupMenuImpl()
void WebPopupMenuImpl::willCloseLayerTreeView()
{
- enterForceCompositingMode(false);
m_layerTreeView = 0;
}
@@ -102,6 +100,19 @@ void WebPopupMenuImpl::initialize(FramelessScrollView* widget, const WebRect& bo
m_client->setWindowRect(bounds);
m_client->show(WebNavigationPolicy()); // Policy is ignored.
}
+
+ m_client->initializeLayerTreeView();
+ m_layerTreeView = m_client->layerTreeView();
+ if (m_layerTreeView) {
+ m_layerTreeView->setVisible(true);
+ m_client->didActivateCompositor();
+ m_layerTreeView->setDeviceScaleFactor(m_client->deviceScaleFactor());
+ m_rootLayer = adoptPtr(Platform::current()->compositorSupport()->createContentLayer(this));
+ m_rootLayer->layer()->setBounds(m_size);
+ m_layerTreeView->setRootLayer(*m_rootLayer->layer());
+ } else {
+ m_client->didDeactivateCompositor();
+ }
}
void WebPopupMenuImpl::handleMouseMove(const WebMouseEvent& event)
@@ -204,40 +215,6 @@ void WebPopupMenuImpl::layout()
{
}
-void WebPopupMenuImpl::enterForceCompositingMode(bool enter)
-{
- // FIXME: Is this function really correct? The other overrides of this function
- // just used to set forceCompositingMode before we removed that setting.
- // crbug.com/378029
- if (m_isAcceleratedCompositingActive == enter)
- return;
-
- if (!enter) {
- m_isAcceleratedCompositingActive = false;
- m_client->didDeactivateCompositor();
- } else if (m_layerTreeView) {
- m_isAcceleratedCompositingActive = true;
- m_client->didActivateCompositor();
- } else {
- TRACE_EVENT0("webkit", "WebPopupMenuImpl::enterForceCompositingMode(true)");
-
- m_client->initializeLayerTreeView();
- m_layerTreeView = m_client->layerTreeView();
- if (m_layerTreeView) {
- m_layerTreeView->setVisible(true);
- m_client->didActivateCompositor();
- m_isAcceleratedCompositingActive = true;
- m_layerTreeView->setDeviceScaleFactor(m_client->deviceScaleFactor());
- m_rootLayer = adoptPtr(Platform::current()->compositorSupport()->createContentLayer(this));
- m_rootLayer->layer()->setBounds(m_size);
- m_layerTreeView->setRootLayer(*m_rootLayer->layer());
- } else {
- m_isAcceleratedCompositingActive = false;
- m_client->didDeactivateCompositor();
- }
- }
-}
-
void WebPopupMenuImpl::paintContents(WebCanvas* canvas, const WebRect& rect, bool, WebFloatRect&,
WebContentLayerClient::GraphicsContextStatus contextStatus)
{
« no previous file with comments | « Source/web/WebPopupMenuImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698