| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above | 9 * 1. Redistributions of source code must retain the above |
| 10 * copyright notice, this list of conditions and the following | 10 * copyright notice, this list of conditions and the following |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 , m_scale(scale) | 41 , m_scale(scale) |
| 42 , m_unitScaling(unitScaling) | 42 , m_unitScaling(unitScaling) |
| 43 , m_sourceGraphic(SourceGraphic::create(this)) | 43 , m_sourceGraphic(SourceGraphic::create(this)) |
| 44 { | 44 { |
| 45 } | 45 } |
| 46 | 46 |
| 47 Filter::~Filter() | 47 Filter::~Filter() |
| 48 { | 48 { |
| 49 } | 49 } |
| 50 | 50 |
| 51 RawPtr<Filter> Filter::create(const FloatRect& referenceBox, const FloatRect& fi
lterRegion, float scale, UnitScaling unitScaling) | 51 Filter* Filter::create(const FloatRect& referenceBox, const FloatRect& filterReg
ion, float scale, UnitScaling unitScaling) |
| 52 { | 52 { |
| 53 return new Filter(referenceBox, filterRegion, scale, unitScaling); | 53 return new Filter(referenceBox, filterRegion, scale, unitScaling); |
| 54 } | 54 } |
| 55 | 55 |
| 56 RawPtr<Filter> Filter::create(float scale) | 56 Filter* Filter::create(float scale) |
| 57 { | 57 { |
| 58 return new Filter(FloatRect(), FloatRect(), scale, UserSpace); | 58 return new Filter(FloatRect(), FloatRect(), scale, UserSpace); |
| 59 } | 59 } |
| 60 | 60 |
| 61 DEFINE_TRACE(Filter) | 61 DEFINE_TRACE(Filter) |
| 62 { | 62 { |
| 63 visitor->trace(m_sourceGraphic); | 63 visitor->trace(m_sourceGraphic); |
| 64 visitor->trace(m_lastEffect); | 64 visitor->trace(m_lastEffect); |
| 65 } | 65 } |
| 66 | 66 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 94 | 94 |
| 95 FloatPoint3D Filter::resolve3dPoint(const FloatPoint3D& point) const | 95 FloatPoint3D Filter::resolve3dPoint(const FloatPoint3D& point) const |
| 96 { | 96 { |
| 97 if (m_unitScaling != BoundingBox) | 97 if (m_unitScaling != BoundingBox) |
| 98 return point; | 98 return point; |
| 99 return FloatPoint3D(point.x() * referenceBox().width() + referenceBox().x(), | 99 return FloatPoint3D(point.x() * referenceBox().width() + referenceBox().x(), |
| 100 point.y() * referenceBox().height() + referenceBox().y(), | 100 point.y() * referenceBox().height() + referenceBox().y(), |
| 101 point.z() * sqrtf(referenceBox().size().diagonalLengthSquared() / 2)); | 101 point.z() * sqrtf(referenceBox().size().diagonalLengthSquared() / 2)); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void Filter::setLastEffect(RawPtr<FilterEffect> effect) | 104 void Filter::setLastEffect(FilterEffect* effect) |
| 105 { | 105 { |
| 106 m_lastEffect = effect; | 106 m_lastEffect = effect; |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace blink | 109 } // namespace blink |
| OLD | NEW |