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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/filters/FELighting.h

Issue 2341923002: Harmonize FilterEffect::mapRect and mapPaintRect (Closed)
Patch Set: Tests and tweaks Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 University of Szeged 2 * Copyright (C) 2010 University of Szeged
3 * Copyright (C) 2010 Zoltan Herczeg 3 * Copyright (C) 2010 Zoltan Herczeg
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 28 matching lines...) Expand all
39 39
40 class PLATFORM_EXPORT FELighting : public FilterEffect { 40 class PLATFORM_EXPORT FELighting : public FilterEffect {
41 protected: 41 protected:
42 enum LightingType { 42 enum LightingType {
43 DiffuseLighting, 43 DiffuseLighting,
44 SpecularLighting 44 SpecularLighting
45 }; 45 };
46 46
47 sk_sp<SkImageFilter> createImageFilter() override; 47 sk_sp<SkImageFilter> createImageFilter() override;
48 48
49 FloatRect mapPaintRect(const FloatRect&, bool forward = true) const final;
50 bool affectsTransparentPixels() const override { return true; } 49 bool affectsTransparentPixels() const override { return true; }
51 50
52 FELighting(Filter*, LightingType, const Color&, float, float, float, float, PassRefPtr<LightSource>); 51 FELighting(Filter*, LightingType, const Color&, float, float, float, float, PassRefPtr<LightSource>);
53 52
54 LightingType m_lightingType; 53 LightingType m_lightingType;
55 RefPtr<LightSource> m_lightSource; 54 RefPtr<LightSource> m_lightSource;
56 55
57 Color m_lightingColor; 56 Color m_lightingColor;
58 float m_surfaceScale; 57 float m_surfaceScale;
59 float m_diffuseConstant; 58 float m_diffuseConstant;
60 float m_specularConstant; 59 float m_specularConstant;
61 float m_specularExponent; 60 float m_specularExponent;
62 }; 61 };
63 62
64 } // namespace blink 63 } // namespace blink
65 64
66 #endif // FELighting_h 65 #endif // FELighting_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698