Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 178113003: Revert of Use SkLayerDrawLooper::Builder to construct SkLayerDrawLooper. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/rendering/EllipsisBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
53 #include "core/html/canvas/CanvasGradient.h" 53 #include "core/html/canvas/CanvasGradient.h"
54 #include "core/html/canvas/CanvasPattern.h" 54 #include "core/html/canvas/CanvasPattern.h"
55 #include "core/html/canvas/CanvasStyle.h" 55 #include "core/html/canvas/CanvasStyle.h"
56 #include "core/html/canvas/DOMPath.h" 56 #include "core/html/canvas/DOMPath.h"
57 #include "core/frame/ImageBitmap.h" 57 #include "core/frame/ImageBitmap.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"
64 #include "platform/graphics/GraphicsContextStateSaver.h" 63 #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 "platform/weborigin/SecurityOrigin.h" 66 #include "platform/weborigin/SecurityOrigin.h"
67 #include "wtf/CheckedArithmetic.h" 67 #include "wtf/CheckedArithmetic.h"
68 #include "wtf/MathExtras.h" 68 #include "wtf/MathExtras.h"
69 #include "wtf/OwnPtr.h" 69 #include "wtf/OwnPtr.h"
70 #include "wtf/Uint8ClampedArray.h" 70 #include "wtf/Uint8ClampedArray.h"
71 #include "wtf/text/StringBuilder.h" 71 #include "wtf/text/StringBuilder.h"
72 72
73 using namespace std; 73 using namespace std;
74 74
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 } 1173 }
1174 1174
1175 void CanvasRenderingContext2D::applyShadow() 1175 void CanvasRenderingContext2D::applyShadow()
1176 { 1176 {
1177 GraphicsContext* c = drawingContext(); 1177 GraphicsContext* c = drawingContext();
1178 if (!c) 1178 if (!c)
1179 return; 1179 return;
1180 1180
1181 if (shouldDrawShadows()) { 1181 if (shouldDrawShadows()) {
1182 c->setShadow(state().m_shadowOffset, state().m_shadowBlur, state().m_sha dowColor, 1182 c->setShadow(state().m_shadowOffset, state().m_shadowBlur, state().m_sha dowColor,
1183 DrawLooperBuilder::ShadowIgnoresTransforms); 1183 DrawLooper::ShadowIgnoresTransforms);
1184 } else { 1184 } else {
1185 c->clearShadow(); 1185 c->clearShadow();
1186 } 1186 }
1187 } 1187 }
1188 1188
1189 bool CanvasRenderingContext2D::shouldDrawShadows() const 1189 bool CanvasRenderingContext2D::shouldDrawShadows() const
1190 { 1190 {
1191 return alphaChannel(state().m_shadowColor) && (state().m_shadowBlur || !stat e().m_shadowOffset.isZero()); 1191 return alphaChannel(state().m_shadowColor) && (state().m_shadowBlur || !stat e().m_shadowOffset.isZero());
1192 } 1192 }
1193 1193
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2394 const int focusRingWidth = 5; 2394 const int focusRingWidth = 5;
2395 const int focusRingOutline = 0; 2395 const int focusRingOutline = 0;
2396 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); 2396 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor);
2397 2397
2398 c->restore(); 2398 c->restore();
2399 2399
2400 didDraw(dirtyRect); 2400 didDraw(dirtyRect);
2401 } 2401 }
2402 2402
2403 } // namespace WebCore 2403 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/EllipsisBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698