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

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

Issue 44253005: 2D Canvas: Refactor code re-attempting to allocate an imageBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@convertL
Patch Set: Merge with CL 74533004 to test on win and mac. Created 7 years, 1 month 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 | « Source/core/html/HTMLCanvasElement.cpp ('k') | no next file » | 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 CanvasRenderingContext2D::~CanvasRenderingContext2D() 106 CanvasRenderingContext2D::~CanvasRenderingContext2D()
107 { 107 {
108 #if !ASSERT_DISABLED 108 #if !ASSERT_DISABLED
109 unwindStateStack(); 109 unwindStateStack();
110 #endif 110 #endif
111 } 111 }
112 112
113 bool CanvasRenderingContext2D::isAccelerated() const 113 bool CanvasRenderingContext2D::isAccelerated() const
114 { 114 {
115 if (!canvas()->hasCreatedImageBuffer()) 115 if (!canvas()->hasImageBuffer())
116 return false; 116 return false;
117 GraphicsContext* context = drawingContext(); 117 GraphicsContext* context = drawingContext();
118 return context && context->isAccelerated(); 118 return context && context->isAccelerated();
119 } 119 }
120 120
121 void CanvasRenderingContext2D::reset() 121 void CanvasRenderingContext2D::reset()
122 { 122 {
123 unwindStateStack(); 123 unwindStateStack();
124 m_stateStack.resize(1); 124 m_stateStack.resize(1);
125 m_stateStack.first() = State(); 125 m_stateStack.first() = State();
(...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after
2429 const int focusRingWidth = 5; 2429 const int focusRingWidth = 5;
2430 const int focusRingOutline = 0; 2430 const int focusRingOutline = 0;
2431 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); 2431 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor);
2432 2432
2433 c->restore(); 2433 c->restore();
2434 2434
2435 didDraw(dirtyRect); 2435 didDraw(dirtyRect);
2436 } 2436 }
2437 2437
2438 } // namespace WebCore 2438 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLCanvasElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698