| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "platform/geometry/FloatRect.h" | 26 #include "platform/geometry/FloatRect.h" |
| 27 #include "platform/geometry/IntRect.h" | 27 #include "platform/geometry/IntRect.h" |
| 28 #include "platform/heap/Handle.h" | 28 #include "platform/heap/Handle.h" |
| 29 #include "wtf/Noncopyable.h" | 29 #include "wtf/Noncopyable.h" |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 class SourceGraphic; | 33 class SourceGraphic; |
| 34 class FilterEffect; | 34 class FilterEffect; |
| 35 | 35 |
| 36 class PLATFORM_EXPORT Filter final : public GarbageCollected<Filter> { | 36 class PLATFORM_EXPORT Filter final : public GarbageCollectedFinalized<Filter> { |
| 37 WTF_MAKE_NONCOPYABLE(Filter); | 37 WTF_MAKE_NONCOPYABLE(Filter); |
| 38 public: | 38 public: |
| 39 enum UnitScaling { | 39 enum UnitScaling { |
| 40 UserSpace, | 40 UserSpace, |
| 41 BoundingBox | 41 BoundingBox |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 static Filter* create(const FloatRect& referenceBox, const FloatRect& filter
Region, float scale, UnitScaling); | 44 static Filter* create(const FloatRect& referenceBox, const FloatRect& filter
Region, float scale, UnitScaling); |
| 45 static Filter* create(float scale); | 45 static Filter* create(float scale); |
| 46 | 46 |
| 47 ~Filter(); |
| 47 DECLARE_TRACE(); | 48 DECLARE_TRACE(); |
| 48 | 49 |
| 49 float scale() const { return m_scale; } | 50 float scale() const { return m_scale; } |
| 50 FloatRect mapLocalRectToAbsoluteRect(const FloatRect&) const; | 51 FloatRect mapLocalRectToAbsoluteRect(const FloatRect&) const; |
| 51 FloatRect mapAbsoluteRectToLocalRect(const FloatRect&) const; | 52 FloatRect mapAbsoluteRectToLocalRect(const FloatRect&) const; |
| 52 | 53 |
| 53 float applyHorizontalScale(float value) const; | 54 float applyHorizontalScale(float value) const; |
| 54 float applyVerticalScale(float value) const; | 55 float applyVerticalScale(float value) const; |
| 55 | 56 |
| 56 FloatPoint3D resolve3dPoint(const FloatPoint3D&) const; | 57 FloatPoint3D resolve3dPoint(const FloatPoint3D&) const; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 73 float m_scale; | 74 float m_scale; |
| 74 UnitScaling m_unitScaling; | 75 UnitScaling m_unitScaling; |
| 75 | 76 |
| 76 Member<SourceGraphic> m_sourceGraphic; | 77 Member<SourceGraphic> m_sourceGraphic; |
| 77 Member<FilterEffect> m_lastEffect; | 78 Member<FilterEffect> m_lastEffect; |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 } // namespace blink | 81 } // namespace blink |
| 81 | 82 |
| 82 #endif // Filter_h | 83 #endif // Filter_h |
| OLD | NEW |