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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2559413002: [1/5] Pass transformed rasterization policy from Blink (Closed)
Patch Set: rebase Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 } 497 }
498 } else { 498 } else {
499 if (hasScrollingLayer()) 499 if (hasScrollingLayer())
500 m_scrollingContentsLayer->setContentsOpaque(false); 500 m_scrollingContentsLayer->setContentsOpaque(false);
501 m_graphicsLayer->setContentsOpaque( 501 m_graphicsLayer->setContentsOpaque(
502 m_owningLayer.backgroundIsKnownToBeOpaqueInRect(compositedBounds())); 502 m_owningLayer.backgroundIsKnownToBeOpaqueInRect(compositedBounds()));
503 } 503 }
504 } 504 }
505 } 505 }
506 506
507 void CompositedLayerMapping::updateRasterizationPolicy() {
508 bool allowTransformedRasterization =
509 !requiresCompositing(m_owningLayer.getCompositingReasons() &
510 ~CompositingReasonSquashingDisallowed);
511 m_graphicsLayer->contentLayer()->setAllowTransformedRasterization(
512 allowTransformedRasterization);
513 if (m_squashingLayer)
514 m_squashingLayer->contentLayer()->setAllowTransformedRasterization(true);
515 }
516
507 void CompositedLayerMapping::updateCompositedBounds() { 517 void CompositedLayerMapping::updateCompositedBounds() {
508 DCHECK_EQ(m_owningLayer.compositor()->lifecycle().state(), 518 DCHECK_EQ(m_owningLayer.compositor()->lifecycle().state(),
509 DocumentLifecycle::InCompositingUpdate); 519 DocumentLifecycle::InCompositingUpdate);
510 // FIXME: if this is really needed for performance, it would be better to 520 // FIXME: if this is really needed for performance, it would be better to
511 // store it on Layer. 521 // store it on Layer.
512 m_compositedBounds = m_owningLayer.boundingBoxForCompositing(); 522 m_compositedBounds = m_owningLayer.boundingBoxForCompositing();
513 m_contentOffsetInCompositingLayerDirty = true; 523 m_contentOffsetInCompositingLayerDirty = true;
514 } 524 }
515 525
516 void CompositedLayerMapping::updateAfterPartResize() { 526 void CompositedLayerMapping::updateAfterPartResize() {
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 m_owningLayer.getScrollableArea()->positionOverflowControls(); 1121 m_owningLayer.getScrollableArea()->positionOverflowControls();
1112 1122
1113 updateLayerBlendMode(layoutObject().styleRef()); 1123 updateLayerBlendMode(layoutObject().styleRef());
1114 updateIsRootForIsolatedGroup(); 1124 updateIsRootForIsolatedGroup();
1115 updateContentsRect(); 1125 updateContentsRect();
1116 updateBackgroundColor(); 1126 updateBackgroundColor();
1117 updateDrawsContent(); 1127 updateDrawsContent();
1118 updateElementIdAndCompositorMutableProperties(); 1128 updateElementIdAndCompositorMutableProperties();
1119 updateBackgroundPaintsOntoScrollingContentsLayer(); 1129 updateBackgroundPaintsOntoScrollingContentsLayer();
1120 updateContentsOpaque(); 1130 updateContentsOpaque();
1131 updateRasterizationPolicy();
1121 updateAfterPartResize(); 1132 updateAfterPartResize();
1122 updateRenderingContext(); 1133 updateRenderingContext();
1123 updateShouldFlattenTransform(); 1134 updateShouldFlattenTransform();
1124 updateChildrenTransform(); 1135 updateChildrenTransform();
1125 updateScrollParent(scrollParent()); 1136 updateScrollParent(scrollParent());
1126 registerScrollingLayers(); 1137 registerScrollingLayers();
1127 1138
1128 updateCompositingReasons(); 1139 updateCompositingReasons();
1129 } 1140 }
1130 1141
(...skipping 2407 matching lines...) Expand 10 before | Expand all | Expand 10 after
3538 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { 3549 } else if (graphicsLayer == m_decorationOutlineLayer.get()) {
3539 name = "Decoration Layer"; 3550 name = "Decoration Layer";
3540 } else { 3551 } else {
3541 NOTREACHED(); 3552 NOTREACHED();
3542 } 3553 }
3543 3554
3544 return name; 3555 return name;
3545 } 3556 }
3546 3557
3547 } // namespace blink 3558 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698