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

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

Issue 951523002: Remove PaintingData from LightSource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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) 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 const FloatPoint3D& direction() const { return m_direction; } 46 const FloatPoint3D& direction() const { return m_direction; }
47 float specularExponent() const { return m_specularExponent; } 47 float specularExponent() const { return m_specularExponent; }
48 float limitingConeAngle() const { return m_limitingConeAngle; } 48 float limitingConeAngle() const { return m_limitingConeAngle; }
49 49
50 virtual bool setPosition(const FloatPoint3D&) override; 50 virtual bool setPosition(const FloatPoint3D&) override;
51 virtual bool setPointsAt(const FloatPoint3D&) override; 51 virtual bool setPointsAt(const FloatPoint3D&) override;
52 52
53 virtual bool setSpecularExponent(float) override; 53 virtual bool setSpecularExponent(float) override;
54 virtual bool setLimitingConeAngle(float) override; 54 virtual bool setLimitingConeAngle(float) override;
55 55
56 virtual void initPaintingData(PaintingData&) const override;
57 virtual void updatePaintingData(PaintingData&, int x, int y, float z) const override;
58
59 virtual TextStream& externalRepresentation(TextStream&) const override; 56 virtual TextStream& externalRepresentation(TextStream&) const override;
60 57
61 private: 58 private:
62 SpotLightSource(const FloatPoint3D& position, const FloatPoint3D& direction, 59 SpotLightSource(const FloatPoint3D& position, const FloatPoint3D& direction,
63 float specularExponent, float limitingConeAngle) 60 float specularExponent, float limitingConeAngle)
64 : LightSource(LS_SPOT) 61 : LightSource(LS_SPOT)
65 , m_position(position) 62 , m_position(position)
66 , m_direction(direction) 63 , m_direction(direction)
67 , m_specularExponent(std::min(std::max(specularExponent, 1.0f), 128.0f)) 64 , m_specularExponent(std::min(std::max(specularExponent, 1.0f), 128.0f))
68 , m_limitingConeAngle(limitingConeAngle) 65 , m_limitingConeAngle(limitingConeAngle)
69 { 66 {
70 } 67 }
71 68
72 FloatPoint3D m_position; 69 FloatPoint3D m_position;
73 FloatPoint3D m_direction; 70 FloatPoint3D m_direction;
74 71
75 float m_specularExponent; 72 float m_specularExponent;
76 float m_limitingConeAngle; 73 float m_limitingConeAngle;
77 }; 74 };
78 75
79 } // namespace blink 76 } // namespace blink
80 77
81 #endif // SpotLightSource_h 78 #endif // SpotLightSource_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/filters/PointLightSource.cpp ('k') | Source/platform/graphics/filters/SpotLightSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698