| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 void removeAllClientsFromCache(bool markForInvalidation = true) override; | 47 void removeAllClientsFromCache(bool markForInvalidation = true) override; |
| 48 void removeClientFromCache(LayoutObject*, bool markForInvalidation = true) o
verride; | 48 void removeClientFromCache(LayoutObject*, bool markForInvalidation = true) o
verride; |
| 49 | 49 |
| 50 SVGPaintServer preparePaintServer(const LayoutObject&) override; | 50 SVGPaintServer preparePaintServer(const LayoutObject&) override; |
| 51 | 51 |
| 52 static const LayoutSVGResourceType s_resourceType = PatternResourceType; | 52 static const LayoutSVGResourceType s_resourceType = PatternResourceType; |
| 53 LayoutSVGResourceType resourceType() const override { return s_resourceType;
} | 53 LayoutSVGResourceType resourceType() const override { return s_resourceType;
} |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 PassOwnPtr<PatternData> buildPatternData(const LayoutObject&); | 56 PassOwnPtr<PatternData> buildPatternData(const LayoutObject&); |
| 57 // Returns a picture to paint the pattern, or nullptr if the picture couldn'
t be created. |
| 58 // Pictures should only fail creation in certain testing situations. |
| 57 PassRefPtr<SkPicture> asPicture(const FloatRect& tile, const AffineTransform
&) const; | 59 PassRefPtr<SkPicture> asPicture(const FloatRect& tile, const AffineTransform
&) const; |
| 58 PatternData* patternForLayoutObject(const LayoutObject&); | 60 PatternData* patternForLayoutObject(const LayoutObject&); |
| 59 | 61 |
| 60 const LayoutSVGResourceContainer* resolveContentElement() const; | 62 const LayoutSVGResourceContainer* resolveContentElement() const; |
| 61 | 63 |
| 62 bool m_shouldCollectPatternAttributes : 1; | 64 bool m_shouldCollectPatternAttributes : 1; |
| 63 #if ENABLE(OILPAN) | 65 #if ENABLE(OILPAN) |
| 64 Persistent<PatternAttributesWrapper> m_attributesWrapper; | 66 Persistent<PatternAttributesWrapper> m_attributesWrapper; |
| 65 | 67 |
| 66 PatternAttributes& mutableAttributes() { return m_attributesWrapper->attribu
tes(); } | 68 PatternAttributes& mutableAttributes() { return m_attributesWrapper->attribu
tes(); } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 77 // Hence, we need one Pattern shader per client. The display list OTOH is th
e same => we | 79 // Hence, we need one Pattern shader per client. The display list OTOH is th
e same => we |
| 78 // should be able to cache a single display list per LayoutSVGResourcePatter
n + one | 80 // should be able to cache a single display list per LayoutSVGResourcePatter
n + one |
| 79 // Pattern(shader) for each client -- this would avoid re-recording when mul
tiple clients | 81 // Pattern(shader) for each client -- this would avoid re-recording when mul
tiple clients |
| 80 // share the same pattern. | 82 // share the same pattern. |
| 81 HashMap<const LayoutObject*, OwnPtr<PatternData>> m_patternMap; | 83 HashMap<const LayoutObject*, OwnPtr<PatternData>> m_patternMap; |
| 82 }; | 84 }; |
| 83 | 85 |
| 84 } // namespace blink | 86 } // namespace blink |
| 85 | 87 |
| 86 #endif | 88 #endif |
| OLD | NEW |