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

Side by Side Diff: Source/platform/graphics/filters/Filter.h

Issue 337903003: Map light-source oBB-relative coordinates to the user-space of the filter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 FloatRect mapAbsoluteRectToLocalRect(const FloatRect& rect) const { return m _inverseTransform.mapRect(rect); } 63 FloatRect mapAbsoluteRectToLocalRect(const FloatRect& rect) const { return m _inverseTransform.mapRect(rect); }
64 64
65 virtual float applyHorizontalScale(float value) const 65 virtual float applyHorizontalScale(float value) const
66 { 66 {
67 return value * m_absoluteTransform.a(); 67 return value * m_absoluteTransform.a();
68 } 68 }
69 virtual float applyVerticalScale(float value) const 69 virtual float applyVerticalScale(float value) const
70 { 70 {
71 return value * m_absoluteTransform.d(); 71 return value * m_absoluteTransform.d();
72 } 72 }
73 virtual FloatPoint3D resolve3dPoint(const FloatPoint3D& point) const { retur n point; }
73 74
74 virtual IntRect sourceImageRect() const = 0; 75 virtual IntRect sourceImageRect() const = 0;
75 76
76 FloatRect absoluteFilterRegion() const { return m_absoluteFilterRegion; } 77 FloatRect absoluteFilterRegion() const { return m_absoluteFilterRegion; }
77 78
78 FloatRect filterRegion() const { return m_filterRegion; } 79 FloatRect filterRegion() const { return m_filterRegion; }
79 void setFilterRegion(const FloatRect& rect) 80 void setFilterRegion(const FloatRect& rect)
80 { 81 {
81 m_filterRegion = rect; 82 m_filterRegion = rect;
82 m_absoluteFilterRegion = m_absoluteTransform.mapRect(m_filterRegion); 83 m_absoluteFilterRegion = m_absoluteTransform.mapRect(m_filterRegion);
(...skipping 27 matching lines...) Expand all
110 AffineTransform m_absoluteTransform; 111 AffineTransform m_absoluteTransform;
111 AffineTransform m_inverseTransform; 112 AffineTransform m_inverseTransform;
112 FloatRect m_absoluteFilterRegion; 113 FloatRect m_absoluteFilterRegion;
113 FloatRect m_filterRegion; 114 FloatRect m_filterRegion;
114 RefPtr<SkImageFilter::Cache> m_cache; 115 RefPtr<SkImageFilter::Cache> m_cache;
115 }; 116 };
116 117
117 } // namespace WebCore 118 } // namespace WebCore
118 119
119 #endif // Filter_h 120 #endif // Filter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698