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

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

Issue 2573883002: Refactor PaintChunkProperties to use PropertyTreeState (Closed)
Patch Set: none Created 4 years 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/BoxClipper.h" 5 #include "core/paint/BoxClipper.h"
6 6
7 #include "core/layout/LayoutBox.h" 7 #include "core/layout/LayoutBox.h"
8 #include "core/layout/svg/LayoutSVGRoot.h" 8 #include "core/layout/svg/LayoutSVGRoot.h"
9 #include "core/paint/ObjectPaintProperties.h" 9 #include "core/paint/ObjectPaintProperties.h"
10 #include "core/paint/PaintInfo.h" 10 #include "core/paint/PaintInfo.h"
(...skipping 27 matching lines...) Expand all
38 m_paintInfo.phase != PaintPhaseSelfOutlineOnly); 38 m_paintInfo.phase != PaintPhaseSelfOutlineOnly);
39 39
40 if (m_paintInfo.phase == PaintPhaseMask) 40 if (m_paintInfo.phase == PaintPhaseMask)
41 return; 41 return;
42 42
43 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 43 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
44 const auto* objectProperties = m_box.paintProperties(); 44 const auto* objectProperties = m_box.paintProperties();
45 if (objectProperties && objectProperties->overflowClip()) { 45 if (objectProperties && objectProperties->overflowClip()) {
46 PaintChunkProperties properties( 46 PaintChunkProperties properties(
47 paintInfo.context.getPaintController().currentPaintChunkProperties()); 47 paintInfo.context.getPaintController().currentPaintChunkProperties());
48 properties.clip = objectProperties->overflowClip(); 48 properties.propertyTreeState.setClip(objectProperties->overflowClip());
49 m_scopedClipProperty.emplace(paintInfo.context.getPaintController(), box, 49 m_scopedClipProperty.emplace(paintInfo.context.getPaintController(), box,
50 paintInfo.displayItemTypeForClipping(), 50 paintInfo.displayItemTypeForClipping(),
51 properties); 51 properties);
52 } 52 }
53 return; 53 return;
54 } 54 }
55 55
56 if (!boxNeedsClip(m_box)) 56 if (!boxNeedsClip(m_box))
57 return; 57 return;
58 58
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 BoxClipper::~BoxClipper() { 98 BoxClipper::~BoxClipper() {
99 if (m_clipType == DisplayItem::kUninitializedType) 99 if (m_clipType == DisplayItem::kUninitializedType)
100 return; 100 return;
101 101
102 DCHECK(boxNeedsClip(m_box)); 102 DCHECK(boxNeedsClip(m_box));
103 m_paintInfo.context.getPaintController().endItem<EndClipDisplayItem>( 103 m_paintInfo.context.getPaintController().endItem<EndClipDisplayItem>(
104 m_box, DisplayItem::clipTypeToEndClipType(m_clipType)); 104 m_box, DisplayItem::clipTypeToEndClipType(m_clipType));
105 } 105 }
106 106
107 } // namespace blink 107 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/BlockPainter.cpp ('k') | third_party/WebKit/Source/core/paint/FramePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698