| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
| 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
| 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. | 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. |
| 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 10 * | 10 * |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "core/html/TextMetrics.h" | 53 #include "core/html/TextMetrics.h" |
| 54 #include "core/html/canvas/CanvasGradient.h" | 54 #include "core/html/canvas/CanvasGradient.h" |
| 55 #include "core/html/canvas/CanvasPattern.h" | 55 #include "core/html/canvas/CanvasPattern.h" |
| 56 #include "core/html/canvas/CanvasStyle.h" | 56 #include "core/html/canvas/CanvasStyle.h" |
| 57 #include "core/html/canvas/Path2D.h" | 57 #include "core/html/canvas/Path2D.h" |
| 58 #include "core/rendering/RenderImage.h" | 58 #include "core/rendering/RenderImage.h" |
| 59 #include "core/rendering/RenderLayer.h" | 59 #include "core/rendering/RenderLayer.h" |
| 60 #include "core/rendering/RenderTheme.h" | 60 #include "core/rendering/RenderTheme.h" |
| 61 #include "platform/fonts/FontCache.h" | 61 #include "platform/fonts/FontCache.h" |
| 62 #include "platform/geometry/FloatQuad.h" | 62 #include "platform/geometry/FloatQuad.h" |
| 63 #include "platform/graphics/DrawLooperBuilder.h" |
| 63 #include "platform/graphics/GraphicsContextStateSaver.h" | 64 #include "platform/graphics/GraphicsContextStateSaver.h" |
| 64 #include "platform/graphics/DrawLooper.h" | |
| 65 #include "platform/text/TextRun.h" | 65 #include "platform/text/TextRun.h" |
| 66 #include "wtf/CheckedArithmetic.h" | 66 #include "wtf/CheckedArithmetic.h" |
| 67 #include "wtf/MathExtras.h" | 67 #include "wtf/MathExtras.h" |
| 68 #include "wtf/OwnPtr.h" | 68 #include "wtf/OwnPtr.h" |
| 69 #include "wtf/Uint8ClampedArray.h" | 69 #include "wtf/Uint8ClampedArray.h" |
| 70 #include "wtf/text/StringBuilder.h" | 70 #include "wtf/text/StringBuilder.h" |
| 71 | 71 |
| 72 using namespace std; | 72 using namespace std; |
| 73 | 73 |
| 74 namespace WebCore { | 74 namespace WebCore { |
| (...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1283 } | 1283 } |
| 1284 | 1284 |
| 1285 void CanvasRenderingContext2D::applyShadow() | 1285 void CanvasRenderingContext2D::applyShadow() |
| 1286 { | 1286 { |
| 1287 GraphicsContext* c = drawingContext(); | 1287 GraphicsContext* c = drawingContext(); |
| 1288 if (!c) | 1288 if (!c) |
| 1289 return; | 1289 return; |
| 1290 | 1290 |
| 1291 if (shouldDrawShadows()) { | 1291 if (shouldDrawShadows()) { |
| 1292 c->setShadow(state().m_shadowOffset, state().m_shadowBlur, state().m_sha
dowColor, | 1292 c->setShadow(state().m_shadowOffset, state().m_shadowBlur, state().m_sha
dowColor, |
| 1293 DrawLooper::ShadowIgnoresTransforms); | 1293 DrawLooperBuilder::ShadowIgnoresTransforms); |
| 1294 } else { | 1294 } else { |
| 1295 c->clearShadow(); | 1295 c->clearShadow(); |
| 1296 } | 1296 } |
| 1297 } | 1297 } |
| 1298 | 1298 |
| 1299 bool CanvasRenderingContext2D::shouldDrawShadows() const | 1299 bool CanvasRenderingContext2D::shouldDrawShadows() const |
| 1300 { | 1300 { |
| 1301 return alphaChannel(state().m_shadowColor) && (state().m_shadowBlur || !stat
e().m_shadowOffset.isZero()); | 1301 return alphaChannel(state().m_shadowColor) && (state().m_shadowBlur || !stat
e().m_shadowOffset.isZero()); |
| 1302 } | 1302 } |
| 1303 | 1303 |
| (...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2300 const int focusRingWidth = 5; | 2300 const int focusRingWidth = 5; |
| 2301 const int focusRingOutline = 0; | 2301 const int focusRingOutline = 0; |
| 2302 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); | 2302 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); |
| 2303 | 2303 |
| 2304 c->restore(); | 2304 c->restore(); |
| 2305 | 2305 |
| 2306 didDraw(dirtyRect); | 2306 didDraw(dirtyRect); |
| 2307 } | 2307 } |
| 2308 | 2308 |
| 2309 } // namespace WebCore | 2309 } // namespace WebCore |
| OLD | NEW |