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

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

Issue 1391753005: (WIP) Invalidation during painting (for synchronized painting) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 SVGPaintContext(const LayoutObject& object, const PaintInfo& paintInfo) 47 SVGPaintContext(const LayoutObject& object, const PaintInfo& paintInfo)
48 : m_object(object) 48 : m_object(object)
49 , m_paintInfo(paintInfo) 49 , m_paintInfo(paintInfo)
50 , m_filter(nullptr) 50 , m_filter(nullptr)
51 , m_clipper(nullptr) 51 , m_clipper(nullptr)
52 , m_clipperState(SVGClipPainter::ClipperNotApplied) 52 , m_clipperState(SVGClipPainter::ClipperNotApplied)
53 , m_masker(nullptr) 53 , m_masker(nullptr)
54 #if ENABLE(ASSERT) 54 #if ENABLE(ASSERT)
55 , m_applyClipMaskAndFilterIfNecessaryCalled(false) 55 , m_applyClipMaskAndFilterIfNecessaryCalled(false)
56 #endif 56 #endif
57 { } 57 {
58 if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled())
59 initializePaintInvalidationState();
60 }
58 61
59 ~SVGPaintContext(); 62 ~SVGPaintContext();
60 63
61 PaintInfo& paintInfo() { return m_filterPaintInfo ? *m_filterPaintInfo : m_p aintInfo; } 64 PaintInfo& paintInfo() { return m_filterPaintInfo ? *m_filterPaintInfo : m_p aintInfo; }
62 65
63 // Return true if these operations aren't necessary or if they are successfu lly applied. 66 // Return true if these operations aren't necessary or if they are successfu lly applied.
64 bool applyClipMaskAndFilterIfNecessary(); 67 bool applyClipMaskAndFilterIfNecessary();
65 68
66 static void paintSubtree(GraphicsContext&, const LayoutObject*); 69 static void paintSubtree(GraphicsContext&, const LayoutObject*);
67 70
68 // TODO(fs): This functions feels a bit misplaced (we don't want this to 71 // TODO(fs): This functions feels a bit misplaced (we don't want this to
69 // turn into the new kitchen sink). Move it if a better location surfaces. 72 // turn into the new kitchen sink). Move it if a better location surfaces.
70 static bool paintForLayoutObject(const PaintInfo&, const ComputedStyle&, con st LayoutObject&, LayoutSVGResourceMode, SkPaint&, const AffineTransform* additi onalPaintServerTransform = nullptr); 73 static bool paintForLayoutObject(const PaintInfo&, const ComputedStyle&, con st LayoutObject&, LayoutSVGResourceMode, SkPaint&, const AffineTransform* additi onalPaintServerTransform = nullptr);
71 74
72 private: 75 private:
73 void applyCompositingIfNecessary(); 76 void applyCompositingIfNecessary();
74 77
75 // Return true if no clipping is necessary or if the clip is successfully ap plied. 78 // Return true if no clipping is necessary or if the clip is successfully ap plied.
76 bool applyClipIfNecessary(SVGResources*); 79 bool applyClipIfNecessary(SVGResources*);
77 80
78 // Return true if no masking is necessary or if the mask is successfully app lied. 81 // Return true if no masking is necessary or if the mask is successfully app lied.
79 bool applyMaskIfNecessary(SVGResources*); 82 bool applyMaskIfNecessary(SVGResources*);
80 83
81 // Return true if no filtering is necessary or if the filter is successfully applied. 84 // Return true if no filtering is necessary or if the filter is successfully applied.
82 bool applyFilterIfNecessary(SVGResources*); 85 bool applyFilterIfNecessary(SVGResources*);
83 86
84 bool isIsolationInstalled() const; 87 bool isIsolationInstalled() const;
85 88
89 void initializePaintInvalidationState();
90
86 const LayoutObject& m_object; 91 const LayoutObject& m_object;
87 PaintInfo m_paintInfo; 92 PaintInfo m_paintInfo;
88 OwnPtr<PaintInfo> m_filterPaintInfo; 93 OwnPtr<PaintInfo> m_filterPaintInfo;
89 LayoutSVGResourceFilter* m_filter; 94 LayoutSVGResourceFilter* m_filter;
90 LayoutSVGResourceClipper* m_clipper; 95 LayoutSVGResourceClipper* m_clipper;
91 SVGClipPainter::ClipperState m_clipperState; 96 SVGClipPainter::ClipperState m_clipperState;
92 LayoutSVGResourceMasker* m_masker; 97 LayoutSVGResourceMasker* m_masker;
93 OwnPtr<CompositingRecorder> m_compositingRecorder; 98 OwnPtr<CompositingRecorder> m_compositingRecorder;
94 OwnPtr<ClipPathRecorder> m_clipPathRecorder; 99 OwnPtr<ClipPathRecorder> m_clipPathRecorder;
95 OwnPtr<SVGFilterRecordingContext> m_filterRecordingContext; 100 OwnPtr<SVGFilterRecordingContext> m_filterRecordingContext;
96 #if ENABLE(ASSERT) 101 #if ENABLE(ASSERT)
97 bool m_applyClipMaskAndFilterIfNecessaryCalled; 102 bool m_applyClipMaskAndFilterIfNecessaryCalled;
98 #endif 103 #endif
104 Optional<PaintInvalidationState> m_paintInvalidationState;
99 }; 105 };
100 106
101 } // namespace blink 107 } // namespace blink
102 108
103 #endif // SVGPaintContext_h 109 #endif // SVGPaintContext_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp ('k') | third_party/WebKit/Source/core/paint/SVGPaintContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698