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 * 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 m_gradient = adoptRef(SkGradientShader::CreateLinear(pts, colors.data(),
pos.data(), static_cast<int>(countUsed), tile, shouldDrawInPMColorSpace, &local
Matrix)); | 258 m_gradient = adoptRef(SkGradientShader::CreateLinear(pts, colors.data(),
pos.data(), static_cast<int>(countUsed), tile, shouldDrawInPMColorSpace, &local
Matrix)); |
259 } | 259 } |
260 | 260 |
261 if (!m_gradient) { | 261 if (!m_gradient) { |
262 // use last color, since our "geometry" was degenerate (e.g. radius==0) | 262 // use last color, since our "geometry" was degenerate (e.g. radius==0) |
263 m_gradient = adoptRef(new SkColorShader(colors[countUsed - 1])); | 263 m_gradient = adoptRef(new SkColorShader(colors[countUsed - 1])); |
264 } | 264 } |
265 return m_gradient.get(); | 265 return m_gradient.get(); |
266 } | 266 } |
267 | 267 |
268 } //namespace | 268 } // namespace blink |
OLD | NEW |