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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/filters/FETile.cpp

Issue 1387573003: Pass SkiaImageFilterBuilder& to FilterEffect::createImageFilter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> 2 * Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 result.setX(boundaries.x()); 53 result.setX(boundaries.x());
54 if (effect->hasY()) 54 if (effect->hasY())
55 result.setY(boundaries.y()); 55 result.setY(boundaries.y());
56 if (effect->hasWidth()) 56 if (effect->hasWidth())
57 result.setWidth(boundaries.width()); 57 result.setWidth(boundaries.width());
58 if (effect->hasHeight()) 58 if (effect->hasHeight())
59 result.setHeight(boundaries.height()); 59 result.setHeight(boundaries.height());
60 return result; 60 return result;
61 } 61 }
62 62
63 PassRefPtr<SkImageFilter> FETile::createImageFilter(SkiaImageFilterBuilder* buil der) 63 PassRefPtr<SkImageFilter> FETile::createImageFilter(SkiaImageFilterBuilder& buil der)
64 { 64 {
65 RefPtr<SkImageFilter> input(builder->build(inputEffect(0), operatingColorSpa ce())); 65 RefPtr<SkImageFilter> input(builder.build(inputEffect(0), operatingColorSpac e()));
66 FloatRect srcRect = inputEffect(0) ? getRect(inputEffect(0)) : filter()->fil terRegion(); 66 FloatRect srcRect = inputEffect(0) ? getRect(inputEffect(0)) : filter()->fil terRegion();
67 FloatRect dstRect = getRect(this); 67 FloatRect dstRect = getRect(this);
68 return adoptRef(SkTileImageFilter::Create(srcRect, dstRect, input.get())); 68 return adoptRef(SkTileImageFilter::Create(srcRect, dstRect, input.get()));
69 } 69 }
70 70
71 TextStream& FETile::externalRepresentation(TextStream& ts, int indent) const 71 TextStream& FETile::externalRepresentation(TextStream& ts, int indent) const
72 { 72 {
73 writeIndent(ts, indent); 73 writeIndent(ts, indent);
74 ts << "[feTile"; 74 ts << "[feTile";
75 FilterEffect::externalRepresentation(ts); 75 FilterEffect::externalRepresentation(ts);
76 ts << "]\n"; 76 ts << "]\n";
77 inputEffect(0)->externalRepresentation(ts, indent + 1); 77 inputEffect(0)->externalRepresentation(ts, indent + 1);
78 78
79 return ts; 79 return ts;
80 } 80 }
81 81
82 } // namespace blink 82 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698