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

Side by Side Diff: Source/core/paint/LayerClipRecorder.cpp

Issue 1284203004: Generate scroll/clip display item hierarchy for SPv2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: stripped localPaintingInfo cleanup and fixed-pos workarounds Created 5 years, 3 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 | Annotate | Revision Log
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 "config.h" 5 #include "config.h"
6 #include "core/paint/LayerClipRecorder.h" 6 #include "core/paint/LayerClipRecorder.h"
7 7
8 #include "core/layout/ClipRect.h" 8 #include "core/layout/ClipRect.h"
9 #include "core/layout/LayoutView.h" 9 #include "core/layout/LayoutView.h"
10 #include "core/paint/DeprecatedPaintLayer.h" 10 #include "core/paint/DeprecatedPaintLayer.h"
11 #include "platform/geometry/IntRect.h" 11 #include "platform/geometry/IntRect.h"
12 #include "platform/graphics/GraphicsContext.h" 12 #include "platform/graphics/GraphicsContext.h"
13 #include "platform/graphics/GraphicsLayer.h" 13 #include "platform/graphics/GraphicsLayer.h"
14 #include "platform/graphics/paint/ClipRecorder.h" 14 #include "platform/graphics/paint/ClipRecorder.h"
15 #include "platform/graphics/paint/DisplayItemList.h" 15 #include "platform/graphics/paint/DisplayItemList.h"
16 16
17 namespace blink { 17 namespace blink {
18 18
19 LayerClipRecorder::LayerClipRecorder(GraphicsContext& graphicsContext, const Lay outBoxModelObject& layoutObject, DisplayItem::Type clipType, const ClipRect& cli pRect, 19 LayerClipRecorder::LayerClipRecorder(GraphicsContext& graphicsContext, const Lay outBoxModelObject& layoutObject, DisplayItem::Type clipType, const ClipRect& cli pRect,
20 const DeprecatedPaintLayerPaintingInfo* localPaintingInfo, const LayoutPoint & fragmentOffset, PaintLayerFlags paintFlags, BorderRadiusClippingRule rule) 20 const DeprecatedPaintLayerPaintingInfo* localPaintingInfo, const LayoutPoint & fragmentOffset, PaintLayerFlags paintFlags, BorderRadiusClippingRule rule)
21 : m_graphicsContext(graphicsContext) 21 : m_graphicsContext(graphicsContext)
22 , m_layoutObject(layoutObject) 22 , m_layoutObject(layoutObject)
23 , m_clipType(clipType) 23 , m_clipType(clipType)
24 { 24 {
25 ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
26
25 IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect()); 27 IntRect snappedClipRect = pixelSnappedIntRect(clipRect.rect());
26 Vector<FloatRoundedRect> roundedRects; 28 Vector<FloatRoundedRect> roundedRects;
27 if (localPaintingInfo && clipRect.hasRadius()) { 29 if (localPaintingInfo && clipRect.hasRadius()) {
28 collectRoundedRectClips(*layoutObject.layer(), *localPaintingInfo, graph icsContext, fragmentOffset, paintFlags, rule, roundedRects); 30 collectRoundedRectClips(*layoutObject.layer(), *localPaintingInfo, graph icsContext, fragmentOffset, paintFlags, rule, roundedRects);
29 } 31 }
30 32
31 ASSERT(m_graphicsContext.displayItemList()); 33 ASSERT(m_graphicsContext.displayItemList());
32 if (m_graphicsContext.displayItemList()->displayItemConstructionIsDisabled() ) 34 if (m_graphicsContext.displayItemList()->displayItemConstructionIsDisabled() )
33 return; 35 return;
34 m_graphicsContext.displayItemList()->createAndAppend<ClipDisplayItem>(layout Object, m_clipType, snappedClipRect, roundedRects); 36 m_graphicsContext.displayItemList()->createAndAppend<ClipDisplayItem>(layout Object, m_clipType, snappedClipRect, roundedRects);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 ASSERT(m_graphicsContext.displayItemList()); 80 ASSERT(m_graphicsContext.displayItemList());
79 if (!m_graphicsContext.displayItemList()->displayItemConstructionIsDisabled( )) { 81 if (!m_graphicsContext.displayItemList()->displayItemConstructionIsDisabled( )) {
80 if (m_graphicsContext.displayItemList()->lastDisplayItemIsNoopBegin()) 82 if (m_graphicsContext.displayItemList()->lastDisplayItemIsNoopBegin())
81 m_graphicsContext.displayItemList()->removeLastDisplayItem(); 83 m_graphicsContext.displayItemList()->removeLastDisplayItem();
82 else 84 else
83 m_graphicsContext.displayItemList()->createAndAppend<EndClipDisplayI tem>(m_layoutObject, DisplayItem::clipTypeToEndClipType(m_clipType)); 85 m_graphicsContext.displayItemList()->createAndAppend<EndClipDisplayI tem>(m_layoutObject, DisplayItem::clipTypeToEndClipType(m_clipType));
84 } 86 }
85 } 87 }
86 88
87 } // namespace blink 89 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698