OLD | NEW |
1 /** | 1 /** |
2 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Google, Inc. All rights reserved. | 5 * Copyright (C) 2009 Google, Inc. All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * Copyright (C) 2012 Zoltan Herczeg <zherczeg@webkit.org>. | 7 * Copyright (C) 2012 Zoltan Herczeg <zherczeg@webkit.org>. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // This class hooks up the correct paint property transform node when spv2 is | 46 // This class hooks up the correct paint property transform node when spv2 is |
47 // enabled, and otherwise works like a TransformRecorder which emits Transform | 47 // enabled, and otherwise works like a TransformRecorder which emits Transform |
48 // display items for spv1. | 48 // display items for spv1. |
49 class SVGTransformContext : public TransformRecorder { | 49 class SVGTransformContext : public TransformRecorder { |
50 STACK_ALLOCATED(); | 50 STACK_ALLOCATED(); |
51 | 51 |
52 public: | 52 public: |
53 SVGTransformContext(GraphicsContext& context, | 53 SVGTransformContext(GraphicsContext& context, |
54 const LayoutObject& object, | 54 const LayoutObject& object, |
55 const AffineTransform& transform) | 55 const AffineTransform& transform) |
56 : TransformRecorder(context, object, transform) { | 56 : TransformRecorder( |
| 57 context, |
| 58 transform, |
| 59 object.visualRect(), |
| 60 object.debugName(), |
| 61 object.paintedOutputOfObjectHasNoEffectRegardlessOfSize()) { |
57 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 62 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
58 const auto* objectProperties = object.paintProperties(); | 63 const auto* objectProperties = object.paintProperties(); |
59 if (!objectProperties) | 64 if (!objectProperties) |
60 return; | 65 return; |
61 if (object.isSVGRoot()) { | 66 if (object.isSVGRoot()) { |
62 // If a transform exists, we can rely on a layer existing to apply it. | 67 // If a transform exists, we can rely on a layer existing to apply it. |
63 DCHECK(!objectProperties || !objectProperties->transform() || | 68 DCHECK(!objectProperties || !objectProperties->transform() || |
64 object.hasLayer()); | 69 object.hasLayer()); |
65 if (objectProperties->svgLocalToBorderBoxTransform()) { | 70 if (objectProperties->svgLocalToBorderBoxTransform()) { |
66 DCHECK(objectProperties->svgLocalToBorderBoxTransform()->matrix() == | 71 DCHECK(objectProperties->svgLocalToBorderBoxTransform()->matrix() == |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 std::unique_ptr<SVGFilterRecordingContext> m_filterRecordingContext; | 159 std::unique_ptr<SVGFilterRecordingContext> m_filterRecordingContext; |
155 Optional<ScopedPaintChunkProperties> m_scopedPaintChunkProperties; | 160 Optional<ScopedPaintChunkProperties> m_scopedPaintChunkProperties; |
156 #if DCHECK_IS_ON() | 161 #if DCHECK_IS_ON() |
157 bool m_applyClipMaskAndFilterIfNecessaryCalled = false; | 162 bool m_applyClipMaskAndFilterIfNecessaryCalled = false; |
158 #endif | 163 #endif |
159 }; | 164 }; |
160 | 165 |
161 } // namespace blink | 166 } // namespace blink |
162 | 167 |
163 #endif // SVGPaintContext_h | 168 #endif // SVGPaintContext_h |
OLD | NEW |