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

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

Issue 181943003: Scaling and offset fix for FELighting (software and skia paths) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed fix to temporary light creation Created 6 years, 9 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 SpecularLighting 54 SpecularLighting
55 }; 55 };
56 56
57 struct LightingData { 57 struct LightingData {
58 // This structure contains only read-only (SMP safe) data 58 // This structure contains only read-only (SMP safe) data
59 Uint8ClampedArray* pixels; 59 Uint8ClampedArray* pixels;
60 float surfaceScale; 60 float surfaceScale;
61 int widthMultipliedByPixelSize; 61 int widthMultipliedByPixelSize;
62 int widthDecreasedByOne; 62 int widthDecreasedByOne;
63 int heightDecreasedByOne; 63 int heightDecreasedByOne;
64 const LightSource* lightSource;
64 65
65 inline void topLeft(int offset, IntPoint& normalVector); 66 inline void topLeft(int offset, IntPoint& normalVector);
66 inline void topRow(int offset, IntPoint& normalVector); 67 inline void topRow(int offset, IntPoint& normalVector);
67 inline void topRight(int offset, IntPoint& normalVector); 68 inline void topRight(int offset, IntPoint& normalVector);
68 inline void leftColumn(int offset, IntPoint& normalVector); 69 inline void leftColumn(int offset, IntPoint& normalVector);
69 inline void interior(int offset, IntPoint& normalVector); 70 inline void interior(int offset, IntPoint& normalVector);
70 inline void rightColumn(int offset, IntPoint& normalVector); 71 inline void rightColumn(int offset, IntPoint& normalVector);
71 inline void bottomLeft(int offset, IntPoint& normalVector); 72 inline void bottomLeft(int offset, IntPoint& normalVector);
72 inline void bottomRow(int offset, IntPoint& normalVector); 73 inline void bottomRow(int offset, IntPoint& normalVector);
73 inline void bottomRight(int offset, IntPoint& normalVector); 74 inline void bottomRight(int offset, IntPoint& normalVector);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 float m_surfaceScale; 116 float m_surfaceScale;
116 float m_diffuseConstant; 117 float m_diffuseConstant;
117 float m_specularConstant; 118 float m_specularConstant;
118 float m_specularExponent; 119 float m_specularExponent;
119 float m_kernelUnitLengthX; 120 float m_kernelUnitLengthX;
120 float m_kernelUnitLengthY; 121 float m_kernelUnitLengthY;
121 122
122 private: 123 private:
123 virtual void applySoftware() OVERRIDE; 124 virtual void applySoftware() OVERRIDE;
124 virtual bool applySkia() OVERRIDE; 125 virtual bool applySkia() OVERRIDE;
126
127 void getTransform(FloatPoint3D* scale, FloatSize* offset) const;
125 }; 128 };
126 129
127 } // namespace WebCore 130 } // namespace WebCore
128 131
129 #endif // FELighting_h 132 #endif // FELighting_h
OLDNEW
« no previous file with comments | « Source/platform/graphics/filters/DistantLightSource.cpp ('k') | Source/platform/graphics/filters/FELighting.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698