Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: Source/platform/graphics/filters/FEConvolveMatrix.cpp

Issue 678163002: Oilpan: move SVG property hierarchy to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased upto r185213 Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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) 2010 Zoltan Herczeg <zherczeg@webkit.org> 6 * Copyright (C) 2010 Zoltan Herczeg <zherczeg@webkit.org>
7 * Copyright (C) 2013 Google Inc. All rights reserved. 7 * Copyright (C) 2013 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 , m_targetOffset(targetOffset) 42 , m_targetOffset(targetOffset)
43 , m_edgeMode(edgeMode) 43 , m_edgeMode(edgeMode)
44 , m_kernelUnitLength(kernelUnitLength) 44 , m_kernelUnitLength(kernelUnitLength)
45 , m_preserveAlpha(preserveAlpha) 45 , m_preserveAlpha(preserveAlpha)
46 , m_kernelMatrix(kernelMatrix) 46 , m_kernelMatrix(kernelMatrix)
47 { 47 {
48 ASSERT(m_kernelSize.width() > 0); 48 ASSERT(m_kernelSize.width() > 0);
49 ASSERT(m_kernelSize.height() > 0); 49 ASSERT(m_kernelSize.height() > 0);
50 } 50 }
51 51
52 PassRefPtr<FEConvolveMatrix> FEConvolveMatrix::create(Filter* filter, const IntS ize& kernelSize, 52 PassRefPtrWillBeRawPtr<FEConvolveMatrix> FEConvolveMatrix::create(Filter* filter , const IntSize& kernelSize,
53 float divisor, float bias, const IntPoint& targetOffset, EdgeModeType edgeMo de, 53 float divisor, float bias, const IntPoint& targetOffset, EdgeModeType edgeMo de,
54 const FloatPoint& kernelUnitLength, bool preserveAlpha, const Vector<float>& kernelMatrix) 54 const FloatPoint& kernelUnitLength, bool preserveAlpha, const Vector<float>& kernelMatrix)
55 { 55 {
56 return adoptRef(new FEConvolveMatrix(filter, kernelSize, divisor, bias, targ etOffset, edgeMode, kernelUnitLength, 56 return adoptRefWillBeNoop(new FEConvolveMatrix(filter, kernelSize, divisor, bias, targetOffset, edgeMode, kernelUnitLength,
57 preserveAlpha, kernelMatrix)); 57 preserveAlpha, kernelMatrix));
58 } 58 }
59 59
60 FloatRect FEConvolveMatrix::mapPaintRect(const FloatRect& rect, bool forward) 60 FloatRect FEConvolveMatrix::mapPaintRect(const FloatRect& rect, bool forward)
61 { 61 {
62 FloatRect result = rect; 62 FloatRect result = rect;
63 63
64 result.moveBy(forward ? -m_targetOffset : m_targetOffset - m_kernelSize); 64 result.moveBy(forward ? -m_targetOffset : m_targetOffset - m_kernelSize);
65 result.expand(m_kernelSize); 65 result.expand(m_kernelSize);
66 return result; 66 return result;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 << "bias=\"" << m_bias << "\" " 231 << "bias=\"" << m_bias << "\" "
232 << "target=\"" << m_targetOffset << "\" " 232 << "target=\"" << m_targetOffset << "\" "
233 << "edgeMode=\"" << m_edgeMode << "\" " 233 << "edgeMode=\"" << m_edgeMode << "\" "
234 << "kernelUnitLength=\"" << m_kernelUnitLength << "\" " 234 << "kernelUnitLength=\"" << m_kernelUnitLength << "\" "
235 << "preserveAlpha=\"" << m_preserveAlpha << "\"]\n"; 235 << "preserveAlpha=\"" << m_preserveAlpha << "\"]\n";
236 inputEffect(0)->externalRepresentation(ts, indent + 1); 236 inputEffect(0)->externalRepresentation(ts, indent + 1);
237 return ts; 237 return ts;
238 } 238 }
239 239
240 }; // namespace blink 240 }; // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/filters/FEConvolveMatrix.h ('k') | Source/platform/graphics/filters/FEDiffuseLighting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698