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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 1730653002: Move squash preventing reasons out of compositing reasons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug and test fixes. Created 4 years, 9 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 static_assert(sizeof(PaintLayer) == sizeof(SameSizeAsPaintLayer), "PaintLayer sh ould stay small"); 117 static_assert(sizeof(PaintLayer) == sizeof(SameSizeAsPaintLayer), "PaintLayer sh ould stay small");
118 118
119 } // namespace 119 } // namespace
120 120
121 using namespace HTMLNames; 121 using namespace HTMLNames;
122 122
123 PaintLayerRareData::PaintLayerRareData() 123 PaintLayerRareData::PaintLayerRareData()
124 : enclosingPaginationLayer(nullptr) 124 : enclosingPaginationLayer(nullptr)
125 , potentialCompositingReasonsFromStyle(CompositingReasonNone) 125 , potentialCompositingReasonsFromStyle(CompositingReasonNone)
126 , compositingReasons(CompositingReasonNone) 126 , compositingReasons(CompositingReasonNone)
127 , squashingDisallowedReasons(SquashingDisallowedReasonsNone)
127 , groupedMapping(nullptr) 128 , groupedMapping(nullptr)
128 { 129 {
129 } 130 }
130 131
131 PaintLayerRareData::~PaintLayerRareData() 132 PaintLayerRareData::~PaintLayerRareData()
132 { 133 {
133 } 134 }
134 135
135 PaintLayer::PaintLayer(LayoutBoxModelObject* layoutObject, PaintLayerType type) 136 PaintLayer::PaintLayer(LayoutBoxModelObject* layoutObject, PaintLayerType type)
136 : m_layerType(type) 137 : m_layerType(type)
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 void PaintLayer::setCompositingReasons(CompositingReasons reasons, CompositingRe asons mask) 1026 void PaintLayer::setCompositingReasons(CompositingReasons reasons, CompositingRe asons mask)
1026 { 1027 {
1027 CompositingReasons oldReasons = m_rareData ? m_rareData->compositingReasons : CompositingReasonNone; 1028 CompositingReasons oldReasons = m_rareData ? m_rareData->compositingReasons : CompositingReasonNone;
1028 if ((oldReasons & mask) == (reasons & mask)) 1029 if ((oldReasons & mask) == (reasons & mask))
1029 return; 1030 return;
1030 CompositingReasons newReasons = (reasons & mask) | (oldReasons & ~mask); 1031 CompositingReasons newReasons = (reasons & mask) | (oldReasons & ~mask);
1031 if (m_rareData || newReasons != CompositingReasonNone) 1032 if (m_rareData || newReasons != CompositingReasonNone)
1032 ensureRareData().compositingReasons = newReasons; 1033 ensureRareData().compositingReasons = newReasons;
1033 } 1034 }
1034 1035
1036 void PaintLayer::setSquashingDisallowedReasons(SquashingDisallowedReasons reason s)
1037 {
1038 SquashingDisallowedReasons oldReasons = m_rareData ? m_rareData->squashingDi sallowedReasons : SquashingDisallowedReasonsNone;
1039 if (oldReasons == reasons)
1040 return;
1041 if (m_rareData || reasons != SquashingDisallowedReasonsNone)
1042 ensureRareData().squashingDisallowedReasons = reasons;
1043 }
1044
1035 void PaintLayer::setHasCompositingDescendant(bool hasCompositingDescendant) 1045 void PaintLayer::setHasCompositingDescendant(bool hasCompositingDescendant)
1036 { 1046 {
1037 if (m_hasCompositingDescendant == static_cast<unsigned>(hasCompositingDescen dant)) 1047 if (m_hasCompositingDescendant == static_cast<unsigned>(hasCompositingDescen dant))
1038 return; 1048 return;
1039 1049
1040 m_hasCompositingDescendant = hasCompositingDescendant; 1050 m_hasCompositingDescendant = hasCompositingDescendant;
1041 1051
1042 if (hasCompositedLayerMapping()) 1052 if (hasCompositedLayerMapping())
1043 compositedLayerMapping()->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdat eLocal); 1053 compositedLayerMapping()->setNeedsGraphicsLayerUpdate(GraphicsLayerUpdat eLocal);
1044 } 1054 }
(...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after
2798 2808
2799 void showLayerTree(const blink::LayoutObject* layoutObject) 2809 void showLayerTree(const blink::LayoutObject* layoutObject)
2800 { 2810 {
2801 if (!layoutObject) { 2811 if (!layoutObject) {
2802 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2812 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2803 return; 2813 return;
2804 } 2814 }
2805 showLayerTree(layoutObject->enclosingLayer()); 2815 showLayerTree(layoutObject->enclosingLayer());
2806 } 2816 }
2807 #endif 2817 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | third_party/WebKit/Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698