| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. | 2 * Copyright (C) 2011 Apple Inc. |
| 3 * Copyright (C) 2010 Sencha, Inc. | 3 * Copyright (C) 2010 Sencha, Inc. |
| 4 * Copyright (C) 2010 Igalia S.L. | 4 * Copyright (C) 2010 Igalia S.L. |
| 5 * All rights reserved. | 5 * All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 void drawRectShadow(GraphicsContext*, const FloatRect&, const RoundedRect::R
adii&); | 64 void drawRectShadow(GraphicsContext*, const FloatRect&, const RoundedRect::R
adii&); |
| 65 void drawInsetShadow(GraphicsContext*, const FloatRect&, const FloatRect& ho
leRect, const RoundedRect::Radii& holeRadii); | 65 void drawInsetShadow(GraphicsContext*, const FloatRect&, const FloatRect& ho
leRect, const RoundedRect::Radii& holeRadii); |
| 66 | 66 |
| 67 void blurLayerImage(unsigned char*, const IntSize&, int stride); | 67 void blurLayerImage(unsigned char*, const IntSize&, int stride); |
| 68 | 68 |
| 69 void clear(); | 69 void clear(); |
| 70 | 70 |
| 71 ShadowType type() const { return m_type; } | 71 ShadowType type() const { return m_type; } |
| 72 | 72 |
| 73 #if PLATFORM(QT) | |
| 74 bool mustUseShadowBlur(GraphicsContext*) const; | |
| 75 #endif | |
| 76 | |
| 77 private: | 73 private: |
| 78 void updateShadowBlurValues(); | 74 void updateShadowBlurValues(); |
| 79 | 75 |
| 80 void drawShadowBuffer(GraphicsContext*); | 76 void drawShadowBuffer(GraphicsContext*); |
| 81 | 77 |
| 82 void adjustBlurRadius(GraphicsContext*); | 78 void adjustBlurRadius(GraphicsContext*); |
| 83 | 79 |
| 84 enum ShadowDirection { | 80 enum ShadowDirection { |
| 85 OuterShadow, | 81 OuterShadow, |
| 86 InnerShadow | 82 InnerShadow |
| (...skipping 29 matching lines...) Expand all Loading... |
| 116 FloatPoint m_layerOrigin; // Top-left corner of the (possibly clipped) bound
ing rect to draw the shadow to. | 112 FloatPoint m_layerOrigin; // Top-left corner of the (possibly clipped) bound
ing rect to draw the shadow to. |
| 117 FloatSize m_layerSize; // Size of m_layerImage pixels that need blurring. | 113 FloatSize m_layerSize; // Size of m_layerImage pixels that need blurring. |
| 118 FloatSize m_layerContextTranslation; // Translation to apply to m_layerConte
xt for the shadow to be correctly clipped. | 114 FloatSize m_layerContextTranslation; // Translation to apply to m_layerConte
xt for the shadow to be correctly clipped. |
| 119 | 115 |
| 120 bool m_shadowsIgnoreTransforms; | 116 bool m_shadowsIgnoreTransforms; |
| 121 }; | 117 }; |
| 122 | 118 |
| 123 } // namespace WebCore | 119 } // namespace WebCore |
| 124 | 120 |
| 125 #endif // ShadowBlur_h | 121 #endif // ShadowBlur_h |
| OLD | NEW |