| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 4 * Copyright 2014 The Chromium Authors. All rights reserved. | 4 * Copyright 2014 The Chromium Authors. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 public: | 41 public: |
| 42 explicit RenderSVGResourcePattern(SVGPatternElement*); | 42 explicit RenderSVGResourcePattern(SVGPatternElement*); |
| 43 | 43 |
| 44 virtual const char* renderName() const override { return "RenderSVGResourceP
attern"; } | 44 virtual const char* renderName() const override { return "RenderSVGResourceP
attern"; } |
| 45 | 45 |
| 46 virtual void removeAllClientsFromCache(bool markForInvalidation = true) over
ride; | 46 virtual void removeAllClientsFromCache(bool markForInvalidation = true) over
ride; |
| 47 virtual void removeClientFromCache(RenderObject*, bool markForInvalidation =
true) override; | 47 virtual void removeClientFromCache(RenderObject*, bool markForInvalidation =
true) override; |
| 48 | 48 |
| 49 virtual SVGPaintServer preparePaintServer(const RenderObject&) override; | 49 virtual SVGPaintServer preparePaintServer(const RenderObject&) override; |
| 50 | 50 |
| 51 static const RenderSVGResourceType s_resourceType = PatternResourceType; |
| 51 virtual RenderSVGResourceType resourceType() const override { return s_resou
rceType; } | 52 virtual RenderSVGResourceType resourceType() const override { return s_resou
rceType; } |
| 52 static const RenderSVGResourceType s_resourceType; | |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 PassOwnPtr<PatternData> buildPatternData(const RenderObject&); | 55 PassOwnPtr<PatternData> buildPatternData(const RenderObject&); |
| 56 PassRefPtr<DisplayList> asDisplayList(const FloatRect& tileBounds, const Aff
ineTransform&) const; | 56 PassRefPtr<DisplayList> asDisplayList(const FloatRect& tileBounds, const Aff
ineTransform&) const; |
| 57 PatternData* patternForRenderer(const RenderObject&); | 57 PatternData* patternForRenderer(const RenderObject&); |
| 58 | 58 |
| 59 bool m_shouldCollectPatternAttributes : 1; | 59 bool m_shouldCollectPatternAttributes : 1; |
| 60 PatternAttributes m_attributes; | 60 PatternAttributes m_attributes; |
| 61 | 61 |
| 62 // FIXME: we can almost do away with this per-object map, but not quite: the
tile size can be | 62 // FIXME: we can almost do away with this per-object map, but not quite: the
tile size can be |
| 63 // relative to the client bounding box, and it gets captured in the cached P
attern shader. | 63 // relative to the client bounding box, and it gets captured in the cached P
attern shader. |
| 64 // Hence, we need one Pattern shader per client. The display list OTOH is th
e same => we | 64 // Hence, we need one Pattern shader per client. The display list OTOH is th
e same => we |
| 65 // should be able to cache a single display list per RenderSVGResourcePatter
n + one | 65 // should be able to cache a single display list per RenderSVGResourcePatter
n + one |
| 66 // Pattern(shader) for each client -- this would avoid re-recording when mul
tiple clients | 66 // Pattern(shader) for each client -- this would avoid re-recording when mul
tiple clients |
| 67 // share the same pattern. | 67 // share the same pattern. |
| 68 HashMap<const RenderObject*, OwnPtr<PatternData> > m_patternMap; | 68 HashMap<const RenderObject*, OwnPtr<PatternData> > m_patternMap; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } | 71 } |
| 72 | 72 |
| 73 #endif | 73 #endif |
| OLD | NEW |