OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 { | 233 { |
234 if (m_gradientSpaceTransformation == gradientSpaceTransformation) | 234 if (m_gradientSpaceTransformation == gradientSpaceTransformation) |
235 return; | 235 return; |
236 | 236 |
237 m_gradientSpaceTransformation = gradientSpaceTransformation; | 237 m_gradientSpaceTransformation = gradientSpaceTransformation; |
238 setPlatformGradientSpaceTransform(gradientSpaceTransformation); | 238 setPlatformGradientSpaceTransform(gradientSpaceTransformation); |
239 | 239 |
240 invalidateHash(); | 240 invalidateHash(); |
241 } | 241 } |
242 | 242 |
243 #if !USE(SKIA) && !USE(CAIRO) && !PLATFORM(BLACKBERRY) | 243 #if !USE(SKIA) && !PLATFORM(BLACKBERRY) |
244 void Gradient::setPlatformGradientSpaceTransform(const AffineTransform&) | 244 void Gradient::setPlatformGradientSpaceTransform(const AffineTransform&) |
245 { | 245 { |
246 } | 246 } |
247 #endif | 247 #endif |
248 | 248 |
249 unsigned Gradient::hash() const | 249 unsigned Gradient::hash() const |
250 { | 250 { |
251 if (m_cachedHash) | 251 if (m_cachedHash) |
252 return m_cachedHash; | 252 return m_cachedHash; |
253 | 253 |
(...skipping 28 matching lines...) Expand all Loading... |
282 | 282 |
283 unsigned parametersHash = StringHasher::hashMemory(¶meters, sizeof(param
eters)); | 283 unsigned parametersHash = StringHasher::hashMemory(¶meters, sizeof(param
eters)); |
284 unsigned stopHash = StringHasher::hashMemory(m_stops.data(), m_stops.size()
* sizeof(ColorStop)); | 284 unsigned stopHash = StringHasher::hashMemory(m_stops.data(), m_stops.size()
* sizeof(ColorStop)); |
285 | 285 |
286 m_cachedHash = pairIntHash(parametersHash, stopHash); | 286 m_cachedHash = pairIntHash(parametersHash, stopHash); |
287 | 287 |
288 return m_cachedHash; | 288 return m_cachedHash; |
289 } | 289 } |
290 | 290 |
291 } //namespace | 291 } //namespace |
OLD | NEW |