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

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

Issue 2479403002: Move all ancestor-dependent properties out of PaintLayer and into an aux. struct. (Closed)
Patch Set: none Created 4 years, 1 month 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 | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | no next file » | 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 namespace blink { 95 namespace blink {
96 96
97 namespace { 97 namespace {
98 98
99 static CompositingQueryMode gCompositingQueryMode = 99 static CompositingQueryMode gCompositingQueryMode =
100 CompositingQueriesAreOnlyAllowedInCertainDocumentLifecyclePhases; 100 CompositingQueriesAreOnlyAllowedInCertainDocumentLifecyclePhases;
101 101
102 struct SameSizeAsPaintLayer : DisplayItemClient { 102 struct SameSizeAsPaintLayer : DisplayItemClient {
103 int bitFields; 103 int bitFields;
104 void* pointers[10]; 104 void* pointers[11];
chrishtr 2016/11/08 00:48:42 This was wrong before.
105 LayoutUnit layoutUnits[4]; 105 LayoutUnit layoutUnits[4];
106 IntSize size; 106 IntSize size;
107 Persistent<PaintLayerScrollableArea> scrollableArea; 107 Persistent<PaintLayerScrollableArea> scrollableArea;
108 struct { 108 struct {
109 IntRect rect, rect2;
110 void* pointers[2];
111 } ancestorCompositingInputs;
112 struct {
113 IntSize size; 109 IntSize size;
114 void* pointer; 110 void* pointer;
115 LayoutRect rect; 111 LayoutRect rect;
116 } previousPaintStatus; 112 } previousPaintStatus;
117 }; 113 };
118 114
119 static_assert(sizeof(PaintLayer) == sizeof(SameSizeAsPaintLayer), 115 static_assert(sizeof(PaintLayer) == sizeof(SameSizeAsPaintLayer),
120 "PaintLayer should stay small"); 116 "PaintLayer should stay small");
121 117
122 } // namespace 118 } // namespace
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 current && !current->m_childNeedsCompositingInputsUpdate; 1014 current && !current->m_childNeedsCompositingInputsUpdate;
1019 current = current->parent()) 1015 current = current->parent())
1020 current->m_childNeedsCompositingInputsUpdate = true; 1016 current->m_childNeedsCompositingInputsUpdate = true;
1021 1017
1022 compositor()->setNeedsCompositingUpdate( 1018 compositor()->setNeedsCompositingUpdate(
1023 CompositingUpdateAfterCompositingInputChange); 1019 CompositingUpdateAfterCompositingInputChange);
1024 } 1020 }
1025 1021
1026 void PaintLayer::updateAncestorDependentCompositingInputs( 1022 void PaintLayer::updateAncestorDependentCompositingInputs(
1027 const AncestorDependentCompositingInputs& compositingInputs, 1023 const AncestorDependentCompositingInputs& compositingInputs,
1028 const RareAncestorDependentCompositingInputs& rareCompositingInputs,
1029 bool hasAncestorWithClipPath) { 1024 bool hasAncestorWithClipPath) {
1030 m_ancestorDependentCompositingInputs = compositingInputs; 1025 m_ancestorDependentCompositingInputs =
1031 if (rareCompositingInputs.isDefault()) 1026 wrapUnique(new AncestorDependentCompositingInputs(compositingInputs));
1032 m_rareAncestorDependentCompositingInputs.reset();
1033 else
1034 m_rareAncestorDependentCompositingInputs = wrapUnique(
1035 new RareAncestorDependentCompositingInputs(rareCompositingInputs));
1036 m_hasAncestorWithClipPath = hasAncestorWithClipPath; 1027 m_hasAncestorWithClipPath = hasAncestorWithClipPath;
1037 m_needsAncestorDependentCompositingInputsUpdate = false; 1028 m_needsAncestorDependentCompositingInputsUpdate = false;
1038 } 1029 }
1039 1030
1040 void PaintLayer::updateDescendantDependentCompositingInputs( 1031 void PaintLayer::updateDescendantDependentCompositingInputs(
1041 bool hasDescendantWithClipPath, 1032 bool hasDescendantWithClipPath,
1042 bool hasNonIsolatedDescendantWithBlendMode, 1033 bool hasNonIsolatedDescendantWithBlendMode,
1043 bool hasRootScrollerAsDescendant) { 1034 bool hasRootScrollerAsDescendant) {
1044 m_hasDescendantWithClipPath = hasDescendantWithClipPath; 1035 m_hasDescendantWithClipPath = hasDescendantWithClipPath;
1045 m_hasNonIsolatedDescendantWithBlendMode = 1036 m_hasNonIsolatedDescendantWithBlendMode =
(...skipping 2228 matching lines...) Expand 10 before | Expand all | Expand 10 after
3274 } 3265 }
3275 3266
3276 void showLayerTree(const blink::LayoutObject* layoutObject) { 3267 void showLayerTree(const blink::LayoutObject* layoutObject) {
3277 if (!layoutObject) { 3268 if (!layoutObject) {
3278 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 3269 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
3279 return; 3270 return;
3280 } 3271 }
3281 showLayerTree(layoutObject->enclosingLayer()); 3272 showLayerTree(layoutObject->enclosingLayer());
3282 } 3273 }
3283 #endif 3274 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698