OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Sencha, Inc. All rights reserved. | 3 * Copyright (C) 2010 Sencha, Inc. All rights reserved. |
4 * Copyright (C) 2010 Igalia S.L. All rights reserved. | 4 * Copyright (C) 2010 Igalia S.L. All rights reserved. |
5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2011. 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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 blurAndColorShadowBuffer(expandedIntSize(m_layerSize)); | 890 blurAndColorShadowBuffer(expandedIntSize(m_layerSize)); |
891 GraphicsContextStateSaver stateSave(*context); | 891 GraphicsContextStateSaver stateSave(*context); |
892 | 892 |
893 context->clearShadow(); | 893 context->clearShadow(); |
894 context->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, roundedIntPoint(
m_layerOrigin), IntRect(0, 0, m_layerSize.width(), m_layerSize.height()), contex
t->compositeOperation()); | 894 context->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, roundedIntPoint(
m_layerOrigin), IntRect(0, 0, m_layerSize.width(), m_layerSize.height()), contex
t->compositeOperation()); |
895 | 895 |
896 m_layerImage = 0; | 896 m_layerImage = 0; |
897 ScratchBuffer::shared().scheduleScratchBufferPurge(); | 897 ScratchBuffer::shared().scheduleScratchBufferPurge(); |
898 } | 898 } |
899 | 899 |
900 #if PLATFORM(QT) | |
901 bool ShadowBlur::mustUseShadowBlur(GraphicsContext* context) const | |
902 { | |
903 // We can't avoid ShadowBlur, since the shadow has blur. | |
904 if (type() == BlurShadow) | |
905 return true; | |
906 // We can avoid ShadowBlur and optimize, since we're not drawing on a | |
907 // canvas and box shadows are affected by the transformation matrix. | |
908 if (!shadowsIgnoreTransforms()) | |
909 return false; | |
910 // We can avoid ShadowBlur, since there are no transformations to apply to t
he canvas. | |
911 if (context->getCTM().isIdentity()) | |
912 return false; | |
913 // Otherwise, no chance avoiding ShadowBlur. | |
914 return true; | |
915 } | |
916 #endif | |
917 | |
918 } // namespace WebCore | 900 } // namespace WebCore |
OLD | NEW |