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

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

Issue 2194273002: Fix border radius on composited children. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revised method based on PaintLayer switching 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/FilterPainter.h" 5 #include "core/paint/FilterPainter.h"
6 6
7 #include "core/paint/FilterEffectBuilder.h" 7 #include "core/paint/FilterEffectBuilder.h"
8 #include "core/paint/LayerClipRecorder.h" 8 #include "core/paint/LayerClipRecorder.h"
9 #include "core/paint/PaintLayer.h" 9 #include "core/paint/PaintLayer.h"
10 #include "platform/RuntimeEnabledFeatures.h" 10 #include "platform/RuntimeEnabledFeatures.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // to accommodate any filter outsets. 46 // to accommodate any filter outsets.
47 // FIXME: It is incorrect to just clip to the damageRect here once multiple 47 // FIXME: It is incorrect to just clip to the damageRect here once multiple
48 // fragments are involved. 48 // fragments are involved.
49 49
50 // Subsequent code should not clip to the dirty rect, since we've already 50 // Subsequent code should not clip to the dirty rect, since we've already
51 // done it above, and doing it later will defeat the outsets. 51 // done it above, and doing it later will defeat the outsets.
52 paintingInfo.clipToDirtyRect = false; 52 paintingInfo.clipToDirtyRect = false;
53 53
54 DCHECK(m_layoutObject); 54 DCHECK(m_layoutObject);
55 55
56 if (clipRect.rect() != paintingInfo.paintDirtyRect || clipRect.hasRadius()) 56 if (clipRect.rect() != paintingInfo.paintDirtyRect || clipRect.hasRadius()) {
57 m_clipRecorder = wrapUnique(new LayerClipRecorder( 57 m_clipRecorder = wrapUnique(new LayerClipRecorder(
58 context, *layer.layoutObject(), DisplayItem::kClipLayerFilter, clipRect, 58 context, *layer.layoutObject(), DisplayItem::kClipLayerFilter, clipRect,
59 &paintingInfo, LayoutPoint(), paintFlags)); 59 paintingInfo.rootLayer, LayoutPoint(), paintFlags));
60 }
60 61
61 if (!context.getPaintController().displayItemConstructionIsDisabled()) { 62 if (!context.getPaintController().displayItemConstructionIsDisabled()) {
62 CompositorFilterOperations compositorFilterOperations = 63 CompositorFilterOperations compositorFilterOperations =
63 layer.createCompositorFilterOperationsForFilter( 64 layer.createCompositorFilterOperationsForFilter(
64 m_layoutObject->styleRef()); 65 m_layoutObject->styleRef());
65 // FIXME: It's possible to have empty CompositorFilterOperations here even 66 // FIXME: It's possible to have empty CompositorFilterOperations here even
66 // though the SkImageFilter produced above is non-null, since the 67 // though the SkImageFilter produced above is non-null, since the
67 // layer's FilterEffectBuilder can have a stale representation of 68 // layer's FilterEffectBuilder can have a stale representation of
68 // the layer's filter. See crbug.com/502026. 69 // the layer's filter. See crbug.com/502026.
69 if (compositorFilterOperations.isEmpty()) 70 if (compositorFilterOperations.isEmpty())
(...skipping 17 matching lines...) Expand all
87 } 88 }
88 89
89 FilterPainter::~FilterPainter() { 90 FilterPainter::~FilterPainter() {
90 if (!m_filterInProgress) 91 if (!m_filterInProgress)
91 return; 92 return;
92 93
93 m_context.getPaintController().endItem<EndFilterDisplayItem>(*m_layoutObject); 94 m_context.getPaintController().endItem<EndFilterDisplayItem>(*m_layoutObject);
94 } 95 }
95 96
96 } // namespace blink 97 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698