| 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 21 matching lines...) Expand all Loading... |
| 32 #include "platform/graphics/GraphicsContext.h" | 32 #include "platform/graphics/GraphicsContext.h" |
| 33 #include "platform/graphics/skia/SkiaUtils.h" | 33 #include "platform/graphics/skia/SkiaUtils.h" |
| 34 #include "third_party/skia/include/core/SkColor.h" | 34 #include "third_party/skia/include/core/SkColor.h" |
| 35 #include "third_party/skia/include/core/SkColorShader.h" | 35 #include "third_party/skia/include/core/SkColorShader.h" |
| 36 #include "third_party/skia/include/core/SkShader.h" | 36 #include "third_party/skia/include/core/SkShader.h" |
| 37 #include "third_party/skia/include/effects/SkGradientShader.h" | 37 #include "third_party/skia/include/effects/SkGradientShader.h" |
| 38 | 38 |
| 39 typedef Vector<SkScalar, 8> ColorStopOffsetVector; | 39 typedef Vector<SkScalar, 8> ColorStopOffsetVector; |
| 40 typedef Vector<SkColor, 8> ColorStopColorVector; | 40 typedef Vector<SkColor, 8> ColorStopColorVector; |
| 41 | 41 |
| 42 namespace WebCore { | 42 namespace blink { |
| 43 | 43 |
| 44 Gradient::Gradient(const FloatPoint& p0, const FloatPoint& p1) | 44 Gradient::Gradient(const FloatPoint& p0, const FloatPoint& p1) |
| 45 : m_p0(p0) | 45 : m_p0(p0) |
| 46 , m_p1(p1) | 46 , m_p1(p1) |
| 47 , m_r0(0) | 47 , m_r0(0) |
| 48 , m_r1(0) | 48 , m_r1(0) |
| 49 , m_aspectRatio(1) | 49 , m_aspectRatio(1) |
| 50 , m_radial(false) | 50 , m_radial(false) |
| 51 , m_stopsSorted(false) | 51 , m_stopsSorted(false) |
| 52 , m_drawInPMColorSpace(false) | 52 , m_drawInPMColorSpace(false) |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |