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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp

Issue 1761003003: Use a union typdef for the return type of canvas.getContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix oilpan -ahem- non-oilpan build Created 4 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
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 , m_pruneLocalFontCacheScheduled(false) 120 , m_pruneLocalFontCacheScheduled(false)
121 { 121 {
122 if (document.settings() && document.settings()->antialiasedClips2dCanvasEnab led()) 122 if (document.settings() && document.settings()->antialiasedClips2dCanvasEnab led())
123 m_clipAntialiasing = AntiAliased; 123 m_clipAntialiasing = AntiAliased;
124 setShouldAntialias(true); 124 setShouldAntialias(true);
125 #if ENABLE(OILPAN) 125 #if ENABLE(OILPAN)
126 ThreadState::current()->registerPreFinalizer(this); 126 ThreadState::current()->registerPreFinalizer(this);
127 #endif 127 #endif
128 } 128 }
129 129
130 void CanvasRenderingContext2D::setCanvasGetContextResult(RenderingContext& resul t)
131 {
132 result.setCanvasRenderingContext2D(RefPtrWillBeRawPtr<CanvasRenderingContext 2D>(this));
Ken Russell (switch to Gerrit) 2016/03/09 19:59:38 Here and throughout: is this the correct type to u
sof 2016/03/09 20:46:30 A transition type is still in order & neeeded; whe
133 }
134
130 void CanvasRenderingContext2D::unwindStateStack() 135 void CanvasRenderingContext2D::unwindStateStack()
131 { 136 {
132 if (size_t stackSize = m_stateStack.size()) { 137 if (size_t stackSize = m_stateStack.size()) {
133 if (SkCanvas* skCanvas = canvas()->existingDrawingCanvas()) { 138 if (SkCanvas* skCanvas = canvas()->existingDrawingCanvas()) {
134 while (--stackSize) 139 while (--stackSize)
135 skCanvas->restore(); 140 skCanvas->restore();
136 } 141 }
137 } 142 }
138 } 143 }
139 144
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 1020
1016 unsigned CanvasRenderingContext2D::hitRegionsCount() const 1021 unsigned CanvasRenderingContext2D::hitRegionsCount() const
1017 { 1022 {
1018 if (m_hitRegionManager) 1023 if (m_hitRegionManager)
1019 return m_hitRegionManager->getHitRegionsCount(); 1024 return m_hitRegionManager->getHitRegionsCount();
1020 1025
1021 return 0; 1026 return 0;
1022 } 1027 }
1023 1028
1024 } // namespace blink 1029 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698