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

Side by Side Diff: Source/core/rendering/svg/RenderSVGResourceContainer.h

Issue 652243002: Hoist paint-server transform adaption out of preparePaintServer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 24 matching lines...) Expand all
35 virtual ~RenderSVGResourceContainer(); 35 virtual ~RenderSVGResourceContainer();
36 36
37 virtual void removeAllClientsFromCache(bool markForInvalidation = true) = 0; 37 virtual void removeAllClientsFromCache(bool markForInvalidation = true) = 0;
38 virtual void removeClientFromCache(RenderObject*, bool markForInvalidation = true) = 0; 38 virtual void removeClientFromCache(RenderObject*, bool markForInvalidation = true) = 0;
39 39
40 virtual void layout() override; 40 virtual void layout() override;
41 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov erride final; 41 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov erride final;
42 42
43 virtual bool isSVGResourceContainer() const override final { return true; } 43 virtual bool isSVGResourceContainer() const override final { return true; }
44 44
45 static AffineTransform transformOnNonScalingStroke(RenderObject*, const Affi neTransform& resourceTransform);
46
47 void idChanged(); 45 void idChanged();
48 void addClientRenderLayer(Node*); 46 void addClientRenderLayer(Node*);
49 void addClientRenderLayer(RenderLayer*); 47 void addClientRenderLayer(RenderLayer*);
50 void removeClientRenderLayer(RenderLayer*); 48 void removeClientRenderLayer(RenderLayer*);
51 49
52 void invalidateCacheAndMarkForLayout(SubtreeLayoutScope* = 0); 50 void invalidateCacheAndMarkForLayout(SubtreeLayoutScope* = 0);
53 51
54 protected: 52 protected:
55 // When adding modes, make sure we don't overflow m_invalidationMask below. 53 // When adding modes, make sure we don't overflow m_invalidationMask below.
56 enum InvalidationMode { 54 enum InvalidationMode {
57 LayoutAndBoundariesInvalidation = 1 << 0, 55 LayoutAndBoundariesInvalidation = 1 << 0,
58 BoundariesInvalidation = 1 << 1, 56 BoundariesInvalidation = 1 << 1,
59 PaintInvalidation = 1 << 2, 57 PaintInvalidation = 1 << 2,
60 ParentOnlyInvalidation = 1 << 3 58 ParentOnlyInvalidation = 1 << 3
61 }; 59 };
62 60
63 // Used from the invalidateClient/invalidateClients methods from classes, in heriting from us. 61 // Used from the invalidateClient/invalidateClients methods from classes, in heriting from us.
64 void markAllClientsForInvalidation(InvalidationMode); 62 void markAllClientsForInvalidation(InvalidationMode);
65 void markAllClientLayersForInvalidation(); 63 void markAllClientLayersForInvalidation();
66 void markClientForInvalidation(RenderObject*, InvalidationMode); 64 void markClientForInvalidation(RenderObject*, InvalidationMode);
67 65
68 void clearInvalidationMask() { m_invalidationMask = 0; } 66 void clearInvalidationMask() { m_invalidationMask = 0; }
69 67
70 static AffineTransform computeResourceSpaceTransform(RenderObject*, const Af fineTransform& baseTransform, const SVGRenderStyle&, unsigned short resourceMode );
71
72 bool m_isInLayout; 68 bool m_isInLayout;
73 69
74 private: 70 private:
75 friend class SVGResourcesCache; 71 friend class SVGResourcesCache;
76 void addClient(RenderObject*); 72 void addClient(RenderObject*);
77 void removeClient(RenderObject*); 73 void removeClient(RenderObject*);
78 74
79 virtual void willBeDestroyed() override final; 75 virtual void willBeDestroyed() override final;
80 void registerResource(); 76 void registerResource();
81 77
(...skipping 28 matching lines...) Expand all
110 return static_cast<Renderer*>(container); 106 return static_cast<Renderer*>(container);
111 } 107 }
112 return 0; 108 return 0;
113 } 109 }
114 110
115 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGResourceContainer, isSVGResourceContain er()); 111 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGResourceContainer, isSVGResourceContain er());
116 112
117 } 113 }
118 114
119 #endif 115 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698