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

Side by Side Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 308183002: Made root translation layer the root when using pinch virtual viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed unit test 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
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.h ('k') | Source/web/WebViewImpl.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) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 CompositingReasons reasons = m_compositingReasonFinder.styleDeterminedReason s(layer->renderer()); 870 CompositingReasons reasons = m_compositingReasonFinder.styleDeterminedReason s(layer->renderer());
871 layer->setStyleDeterminedCompositingReasons(reasons); 871 layer->setStyleDeterminedCompositingReasons(reasons);
872 } 872 }
873 873
874 void RenderLayerCompositor::updateDirectCompositingReasons(RenderLayer* layer) 874 void RenderLayerCompositor::updateDirectCompositingReasons(RenderLayer* layer)
875 { 875 {
876 CompositingReasons reasons = m_compositingReasonFinder.directReasons(layer); 876 CompositingReasons reasons = m_compositingReasonFinder.directReasons(layer);
877 layer->setCompositingReasons(reasons, CompositingReasonComboAllDirectReasons ); 877 layer->setCompositingReasons(reasons, CompositingReasonComboAllDirectReasons );
878 } 878 }
879 879
880 void RenderLayerCompositor::setOverlayLayer(GraphicsLayer* layer)
881 {
882 ASSERT(rootGraphicsLayer());
883
884 if (layer->parent() != m_overflowControlsHostLayer.get())
885 m_overflowControlsHostLayer->addChild(layer);
886 }
887
880 bool RenderLayerCompositor::canBeComposited(const RenderLayer* layer) const 888 bool RenderLayerCompositor::canBeComposited(const RenderLayer* layer) const
881 { 889 {
882 // FIXME: We disable accelerated compositing for elements in a RenderFlowThr ead as it doesn't work properly. 890 // FIXME: We disable accelerated compositing for elements in a RenderFlowThr ead as it doesn't work properly.
883 // See http://webkit.org/b/84900 to re-enable it. 891 // See http://webkit.org/b/84900 to re-enable it.
884 return m_hasAcceleratedCompositing && layer->isSelfPaintingLayer() && !layer ->subtreeIsInvisible() && layer->renderer()->flowThreadState() == RenderObject:: NotInsideFlowThread; 892 return m_hasAcceleratedCompositing && layer->isSelfPaintingLayer() && !layer ->subtreeIsInvisible() && layer->renderer()->flowThreadState() == RenderObject:: NotInsideFlowThread;
885 } 893 }
886 894
887 // Return true if the given layer has some ancestor in the RenderLayer hierarchy that clips, 895 // Return true if the given layer has some ancestor in the RenderLayer hierarchy that clips,
888 // up to the enclosing compositing ancestor. This is required because compositin g layers are parented 896 // up to the enclosing compositing ancestor. This is required because compositin g layers are parented
889 // according to the z-order hierarchy, yet clipping goes down the renderer hiera rchy. 897 // according to the z-order hierarchy, yet clipping goes down the renderer hiera rchy.
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 } else if (graphicsLayer == m_scrollLayer.get()) { 1391 } else if (graphicsLayer == m_scrollLayer.get()) {
1384 name = "LocalFrame Scrolling Layer"; 1392 name = "LocalFrame Scrolling Layer";
1385 } else { 1393 } else {
1386 ASSERT_NOT_REACHED(); 1394 ASSERT_NOT_REACHED();
1387 } 1395 }
1388 1396
1389 return name; 1397 return name;
1390 } 1398 }
1391 1399
1392 } // namespace WebCore 1400 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698