| 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 11 matching lines...) Expand all Loading... |
| 22 #define Filter_h | 22 #define Filter_h |
| 23 | 23 |
| 24 #include "platform/PlatformExport.h" | 24 #include "platform/PlatformExport.h" |
| 25 #include "platform/geometry/FloatRect.h" | 25 #include "platform/geometry/FloatRect.h" |
| 26 #include "platform/geometry/FloatSize.h" | 26 #include "platform/geometry/FloatSize.h" |
| 27 #include "platform/graphics/ImageBuffer.h" | 27 #include "platform/graphics/ImageBuffer.h" |
| 28 #include "wtf/RefCounted.h" | 28 #include "wtf/RefCounted.h" |
| 29 | 29 |
| 30 namespace blink { | 30 namespace blink { |
| 31 | 31 |
| 32 class FilterEffect; | |
| 33 | |
| 34 class PLATFORM_EXPORT Filter : public RefCounted<Filter> { | 32 class PLATFORM_EXPORT Filter : public RefCounted<Filter> { |
| 35 public: | 33 public: |
| 36 Filter(const AffineTransform& absoluteTransform) | 34 Filter(const AffineTransform& absoluteTransform) |
| 37 : m_absoluteTransform(absoluteTransform) | 35 : m_absoluteTransform(absoluteTransform) |
| 38 , m_inverseTransform(absoluteTransform.inverse()) | 36 , m_inverseTransform(absoluteTransform.inverse()) |
| 39 { | 37 { |
| 40 // Filters can only accept scaling and translating transformations, as c
oordinates | 38 // Filters can only accept scaling and translating transformations, as c
oordinates |
| 41 // in most primitives are given in horizontal and vertical directions. | 39 // in most primitives are given in horizontal and vertical directions. |
| 42 ASSERT(!absoluteTransform.b() && !absoluteTransform.c()); | 40 ASSERT(!absoluteTransform.b() && !absoluteTransform.c()); |
| 43 } | 41 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 OwnPtr<ImageBuffer> m_sourceImage; | 84 OwnPtr<ImageBuffer> m_sourceImage; |
| 87 AffineTransform m_absoluteTransform; | 85 AffineTransform m_absoluteTransform; |
| 88 AffineTransform m_inverseTransform; | 86 AffineTransform m_inverseTransform; |
| 89 FloatRect m_absoluteFilterRegion; | 87 FloatRect m_absoluteFilterRegion; |
| 90 FloatRect m_filterRegion; | 88 FloatRect m_filterRegion; |
| 91 }; | 89 }; |
| 92 | 90 |
| 93 } // namespace blink | 91 } // namespace blink |
| 94 | 92 |
| 95 #endif // Filter_h | 93 #endif // Filter_h |
| OLD | NEW |