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

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

Issue 1355713004: Drop virtual LightSource::create (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | Source/platform/graphics/filters/LightSource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> 2 * Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
3 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 4 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
5 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> 5 * Copyright (C) 2005 Eric Seidel <eric@webkit.org>
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 16 matching lines...) Expand all
27 27
28 namespace blink { 28 namespace blink {
29 29
30 class PLATFORM_EXPORT DistantLightSource : public LightSource { 30 class PLATFORM_EXPORT DistantLightSource : public LightSource {
31 public: 31 public:
32 static PassRefPtr<DistantLightSource> create(float azimuth, float elevation) 32 static PassRefPtr<DistantLightSource> create(float azimuth, float elevation)
33 { 33 {
34 return adoptRef(new DistantLightSource(azimuth, elevation)); 34 return adoptRef(new DistantLightSource(azimuth, elevation));
35 } 35 }
36 36
37 PassRefPtr<LightSource> create(const FloatPoint3D& scale, const FloatSize& o ffset) const override
38 {
39 return adoptRef(new DistantLightSource(m_azimuth, m_elevation));
40 }
41
42 float azimuth() const { return m_azimuth; } 37 float azimuth() const { return m_azimuth; }
43 float elevation() const { return m_elevation; } 38 float elevation() const { return m_elevation; }
44 39
45 bool setAzimuth(float) override; 40 bool setAzimuth(float) override;
46 bool setElevation(float) override; 41 bool setElevation(float) override;
47 42
48 TextStream& externalRepresentation(TextStream&) const override; 43 TextStream& externalRepresentation(TextStream&) const override;
49 44
50 private: 45 private:
51 DistantLightSource(float azimuth, float elevation) 46 DistantLightSource(float azimuth, float elevation)
52 : LightSource(LS_DISTANT) 47 : LightSource(LS_DISTANT)
53 , m_azimuth(azimuth) 48 , m_azimuth(azimuth)
54 , m_elevation(elevation) 49 , m_elevation(elevation)
55 { 50 {
56 } 51 }
57 52
58 float m_azimuth; 53 float m_azimuth;
59 float m_elevation; 54 float m_elevation;
60 }; 55 };
61 56
62 } // namespace blink 57 } // namespace blink
63 58
64 #endif // DistantLightSource_h 59 #endif // DistantLightSource_h
OLDNEW
« no previous file with comments | « no previous file | Source/platform/graphics/filters/LightSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698