Chromium Code Reviews| 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 12 matching lines...) Expand all Loading... | |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef SVGRenderingContext_h | 25 #ifndef SVGRenderingContext_h |
| 26 #define SVGRenderingContext_h | 26 #define SVGRenderingContext_h |
| 27 | 27 |
| 28 #include "core/paint/CompositingRecorder.h" | 28 #include "core/paint/CompositingRecorder.h" |
| 29 #include "core/paint/FloatClipRecorder.h" | 29 #include "core/paint/FloatClipRecorder.h" |
| 30 #include "core/rendering/PaintInfo.h" | 30 #include "core/rendering/PaintInfo.h" |
| 31 #include "core/rendering/svg/RenderSVGResourceClipper.h" | 31 #include "core/rendering/svg/RenderSVGResourceClipper.h" |
| 32 #include "platform/graphics/paint/ClipPathRecorder.h" | 32 #include "platform/graphics/paint/ClipPathRecorder.h" |
| 33 #include "platform/graphics/paint/DisplayItemList.h" | |
| 33 #include "platform/transforms/AffineTransform.h" | 34 #include "platform/transforms/AffineTransform.h" |
| 34 | 35 |
| 35 namespace blink { | 36 namespace blink { |
| 36 | 37 |
| 37 class RenderObject; | 38 class RenderObject; |
| 38 class RenderSVGResourceFilter; | 39 class RenderSVGResourceFilter; |
| 39 class RenderSVGResourceMasker; | 40 class RenderSVGResourceMasker; |
| 40 class SVGResources; | 41 class SVGResources; |
| 41 | 42 |
| 42 class SubtreeContentTransformScope { | 43 class SubtreeContentTransformScope { |
| 43 public: | 44 public: |
| 44 SubtreeContentTransformScope(const AffineTransform&); | 45 SubtreeContentTransformScope(const AffineTransform&); |
| 45 ~SubtreeContentTransformScope(); | 46 ~SubtreeContentTransformScope(); |
| 46 | 47 |
| 47 private: | 48 private: |
| 48 AffineTransform m_savedContentTransformation; | 49 AffineTransform m_savedContentTransformation; |
| 49 }; | 50 }; |
| 50 | 51 |
| 51 class SVGRenderingContext { | 52 class SVGRenderingContext { |
| 52 STACK_ALLOCATED(); | 53 STACK_ALLOCATED(); |
| 53 public: | 54 public: |
| 54 SVGRenderingContext(RenderObject& object, const PaintInfo& paintInfo) | 55 SVGRenderingContext(RenderObject& object, const PaintInfo& paintInfo) |
| 55 : m_object(&object) | 56 : m_object(&object) |
| 56 , m_paintInfo(paintInfo) | 57 , m_paintInfo(paintInfo) |
| 58 , m_originalPaintInfo(&paintInfo) | |
| 57 , m_filter(nullptr) | 59 , m_filter(nullptr) |
| 58 , m_clipper(nullptr) | 60 , m_clipper(nullptr) |
| 59 , m_clipperState(RenderSVGResourceClipper::ClipperNotApplied) | 61 , m_clipperState(RenderSVGResourceClipper::ClipperNotApplied) |
| 60 , m_masker(nullptr) | 62 , m_masker(nullptr) |
| 61 #if ENABLE(ASSERT) | 63 #if ENABLE(ASSERT) |
| 62 , m_applyClipMaskAndFilterIfNecessaryCalled(false) | 64 , m_applyClipMaskAndFilterIfNecessaryCalled(false) |
| 63 #endif | 65 #endif |
| 64 { } | 66 { } |
| 65 | 67 |
| 66 ~SVGRenderingContext(); | 68 ~SVGRenderingContext(); |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 83 // Return true if no masking is necessary or if the mask is successfully app lied. | 85 // Return true if no masking is necessary or if the mask is successfully app lied. |
| 84 bool applyMaskIfNecessary(SVGResources*); | 86 bool applyMaskIfNecessary(SVGResources*); |
| 85 | 87 |
| 86 // Return true if no filtering is necessary or if the filter is successfully applied. | 88 // Return true if no filtering is necessary or if the filter is successfully applied. |
| 87 bool applyFilterIfNecessary(SVGResources*); | 89 bool applyFilterIfNecessary(SVGResources*); |
| 88 | 90 |
| 89 bool isIsolationInstalled() const; | 91 bool isIsolationInstalled() const; |
| 90 | 92 |
| 91 RawPtrWillBeMember<RenderObject> m_object; | 93 RawPtrWillBeMember<RenderObject> m_object; |
| 92 PaintInfo m_paintInfo; | 94 PaintInfo m_paintInfo; |
| 95 const PaintInfo* m_originalPaintInfo; | |
| 96 OwnPtr<GraphicsContext> m_filterContentGraphicsContext; | |
| 97 OwnPtr<DisplayItemList> m_filterContentDisplayItemList; | |
|
chrishtr
2015/01/24 00:02:02
Switch this order, so that we are not in a state w
pdr.
2015/01/24 01:13:36
Done
| |
| 93 RawPtrWillBeMember<RenderSVGResourceFilter> m_filter; | 98 RawPtrWillBeMember<RenderSVGResourceFilter> m_filter; |
| 94 RawPtrWillBeMember<RenderSVGResourceClipper> m_clipper; | 99 RawPtrWillBeMember<RenderSVGResourceClipper> m_clipper; |
| 95 RenderSVGResourceClipper::ClipperState m_clipperState; | 100 RenderSVGResourceClipper::ClipperState m_clipperState; |
| 96 RawPtrWillBeMember<RenderSVGResourceMasker> m_masker; | 101 RawPtrWillBeMember<RenderSVGResourceMasker> m_masker; |
| 97 OwnPtr<CompositingRecorder> m_compositingRecorder; | 102 OwnPtr<CompositingRecorder> m_compositingRecorder; |
| 98 OwnPtr<FloatClipRecorder> m_clipRecorder; | 103 OwnPtr<FloatClipRecorder> m_clipRecorder; |
| 99 OwnPtr<ClipPathRecorder> m_clipPathRecorder; | 104 OwnPtr<ClipPathRecorder> m_clipPathRecorder; |
| 100 #if ENABLE(ASSERT) | 105 #if ENABLE(ASSERT) |
| 101 bool m_applyClipMaskAndFilterIfNecessaryCalled; | 106 bool m_applyClipMaskAndFilterIfNecessaryCalled; |
| 102 #endif | 107 #endif |
| 103 }; | 108 }; |
| 104 | 109 |
| 105 } // namespace blink | 110 } // namespace blink |
| 106 | 111 |
| 107 #endif // SVGRenderingContext_h | 112 #endif // SVGRenderingContext_h |
| OLD | NEW |