OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 builder->appendEffectToEffectReferences(effect, effectElement->renderer( )); | 100 builder->appendEffectToEffectReferences(effect, effectElement->renderer( )); |
101 effectElement->setStandardAttributes(effect.get()); | 101 effectElement->setStandardAttributes(effect.get()); |
102 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter PrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnitsCurrent Value(), targetBoundingBox)); | 102 effect->setEffectBoundaries(SVGLengthContext::resolveRectangle<SVGFilter PrimitiveStandardAttributes>(effectElement, filterElement->primitiveUnitsCurrent Value(), targetBoundingBox)); |
103 effect->setOperatingColorSpace( | 103 effect->setOperatingColorSpace( |
104 effectElement->renderer()->style()->svgStyle()->colorInterpolationFi lters() == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceDeviceRGB); | 104 effectElement->renderer()->style()->svgStyle()->colorInterpolationFi lters() == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceDeviceRGB); |
105 builder->add(AtomicString(effectElement->result()->currentValue()->value ()), effect); | 105 builder->add(AtomicString(effectElement->result()->currentValue()->value ()), effect); |
106 } | 106 } |
107 return builder.release(); | 107 return builder.release(); |
108 } | 108 } |
109 | 109 |
110 bool RenderSVGResourceFilter::fitsInMaximumImageSize(const FloatSize& size, Floa tSize& scale) | 110 bool RenderSVGResourceFilter::fitsInMaximumImageSize(const FloatSize& size, Floa tSize& scale) |
Stephen Chennney
2014/02/11 14:47:21
The current implementation is wrong. It should com
| |
111 { | 111 { |
112 bool matchesFilterSize = true; | 112 bool matchesFilterSize = true; |
113 if (size.width() * scale.width() > kMaxFilterSize) { | 113 if (size.width() * scale.width() > FilterEffect::maxFilterArea()) { |
fs
2014/02/07 10:17:51
This compares a distance to an area.
| |
114 scale.setWidth(kMaxFilterSize / size.width()); | 114 scale.setWidth(FilterEffect::maxFilterArea() / size.width()); |
115 matchesFilterSize = false; | 115 matchesFilterSize = false; |
116 } | 116 } |
117 if (size.height() * scale.height() > kMaxFilterSize) { | 117 if (size.height() * scale.height() > FilterEffect::maxFilterArea()) { |
fs
2014/02/07 10:17:51
Same as above.
| |
118 scale.setHeight(kMaxFilterSize / size.height()); | 118 scale.setHeight(FilterEffect::maxFilterArea() / size.height()); |
119 matchesFilterSize = false; | 119 matchesFilterSize = false; |
120 } | 120 } |
121 | 121 |
122 return matchesFilterSize; | 122 return matchesFilterSize; |
123 } | 123 } |
124 | 124 |
125 static bool createImageBuffer(const Filter* filter, OwnPtr<ImageBuffer>& imageBu ffer, bool accelerated) | 125 static bool createImageBuffer(const Filter* filter, OwnPtr<ImageBuffer>& imageBu ffer, bool accelerated) |
126 { | 126 { |
127 IntRect paintRect = filter->sourceImageRect(); | 127 IntRect paintRect = filter->sourceImageRect(); |
128 // Don't create empty ImageBuffers. | 128 // Don't create empty ImageBuffers. |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
409 markAllClientLayersForInvalidation(); | 409 markAllClientLayersForInvalidation(); |
410 } | 410 } |
411 | 411 |
412 FloatRect RenderSVGResourceFilter::drawingRegion(RenderObject* object) const | 412 FloatRect RenderSVGResourceFilter::drawingRegion(RenderObject* object) const |
413 { | 413 { |
414 FilterData* filterData = m_filter.get(object); | 414 FilterData* filterData = m_filter.get(object); |
415 return filterData ? filterData->drawingRegion : FloatRect(); | 415 return filterData ? filterData->drawingRegion : FloatRect(); |
416 } | 416 } |
417 | 417 |
418 } | 418 } |
OLD | NEW |