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

Side by Side Diff: Source/core/paint/SVGPaintContext.h

Issue 979883002: [S.P.] Move clip painting to SVGClipPainter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: codereview fixes Created 5 years, 9 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
« no previous file with comments | « Source/core/paint/SVGClipPainter.cpp ('k') | Source/core/paint/SVGPaintContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 11 matching lines...) Expand all
22 * Boston, MA 02110-1301, USA. 22 * Boston, MA 02110-1301, USA.
23 */ 23 */
24 24
25 #ifndef SVGPaintContext_h 25 #ifndef SVGPaintContext_h
26 #define SVGPaintContext_h 26 #define SVGPaintContext_h
27 27
28 #include "core/layout/PaintInfo.h" 28 #include "core/layout/PaintInfo.h"
29 #include "core/layout/svg/LayoutSVGResourceClipper.h" 29 #include "core/layout/svg/LayoutSVGResourceClipper.h"
30 #include "core/paint/CompositingRecorder.h" 30 #include "core/paint/CompositingRecorder.h"
31 #include "core/paint/FloatClipRecorder.h" 31 #include "core/paint/FloatClipRecorder.h"
32 #include "core/paint/SVGClipPainter.h"
32 #include "platform/graphics/paint/ClipPathRecorder.h" 33 #include "platform/graphics/paint/ClipPathRecorder.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 LayoutObject; 38 class LayoutObject;
38 class LayoutSVGResourceFilter; 39 class LayoutSVGResourceFilter;
39 class LayoutSVGResourceMasker; 40 class LayoutSVGResourceMasker;
40 class SVGResources; 41 class SVGResources;
41 42
42 class SVGPaintContext { 43 class SVGPaintContext {
43 STACK_ALLOCATED(); 44 STACK_ALLOCATED();
44 public: 45 public:
45 SVGPaintContext(LayoutObject& object, const PaintInfo& paintInfo) 46 SVGPaintContext(LayoutObject& object, const PaintInfo& paintInfo)
46 : m_object(&object) 47 : m_object(&object)
47 , m_paintInfo(paintInfo) 48 , m_paintInfo(paintInfo)
48 , m_originalPaintInfo(&paintInfo) 49 , m_originalPaintInfo(&paintInfo)
49 , m_filter(nullptr) 50 , m_filter(nullptr)
50 , m_clipper(nullptr) 51 , m_clipper(nullptr)
51 , m_clipperState(LayoutSVGResourceClipper::ClipperNotApplied) 52 , m_clipperState(SVGClipPainter::ClipperNotApplied)
52 , m_masker(nullptr) 53 , m_masker(nullptr)
53 #if ENABLE(ASSERT) 54 #if ENABLE(ASSERT)
54 , m_applyClipMaskAndFilterIfNecessaryCalled(false) 55 , m_applyClipMaskAndFilterIfNecessaryCalled(false)
55 #endif 56 #endif
56 { } 57 { }
57 58
58 ~SVGPaintContext(); 59 ~SVGPaintContext();
59 60
60 PaintInfo& paintInfo() { return m_paintInfo; } 61 PaintInfo& paintInfo() { return m_paintInfo; }
61 62
(...skipping 14 matching lines...) Expand all
76 // Return true if no filtering is necessary or if the filter is successfully applied. 77 // Return true if no filtering is necessary or if the filter is successfully applied.
77 bool applyFilterIfNecessary(SVGResources*); 78 bool applyFilterIfNecessary(SVGResources*);
78 79
79 bool isIsolationInstalled() const; 80 bool isIsolationInstalled() const;
80 81
81 RawPtrWillBeMember<LayoutObject> m_object; 82 RawPtrWillBeMember<LayoutObject> m_object;
82 PaintInfo m_paintInfo; 83 PaintInfo m_paintInfo;
83 const PaintInfo* m_originalPaintInfo; 84 const PaintInfo* m_originalPaintInfo;
84 RawPtrWillBeMember<LayoutSVGResourceFilter> m_filter; 85 RawPtrWillBeMember<LayoutSVGResourceFilter> m_filter;
85 RawPtrWillBeMember<LayoutSVGResourceClipper> m_clipper; 86 RawPtrWillBeMember<LayoutSVGResourceClipper> m_clipper;
86 LayoutSVGResourceClipper::ClipperState m_clipperState; 87 SVGClipPainter::ClipperState m_clipperState;
87 RawPtrWillBeMember<LayoutSVGResourceMasker> m_masker; 88 RawPtrWillBeMember<LayoutSVGResourceMasker> m_masker;
88 OwnPtr<CompositingRecorder> m_compositingRecorder; 89 OwnPtr<CompositingRecorder> m_compositingRecorder;
89 OwnPtr<FloatClipRecorder> m_clipRecorder; 90 OwnPtr<FloatClipRecorder> m_clipRecorder;
90 OwnPtr<ClipPathRecorder> m_clipPathRecorder; 91 OwnPtr<ClipPathRecorder> m_clipPathRecorder;
91 #if ENABLE(ASSERT) 92 #if ENABLE(ASSERT)
92 bool m_applyClipMaskAndFilterIfNecessaryCalled; 93 bool m_applyClipMaskAndFilterIfNecessaryCalled;
93 #endif 94 #endif
94 }; 95 };
95 96
96 } // namespace blink 97 } // namespace blink
97 98
98 #endif // SVGPaintContext_h 99 #endif // SVGPaintContext_h
OLDNEW
« no previous file with comments | « Source/core/paint/SVGClipPainter.cpp ('k') | Source/core/paint/SVGPaintContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698