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

Side by Side Diff: sky/engine/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 723253004: Remove tons of OILPAN. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 if (contextLostRestoredEventsEnabled()) { 154 if (contextLostRestoredEventsEnabled()) {
155 m_dispatchContextRestoredEventTimer.startOneShot(0, FROM_HERE); 155 m_dispatchContextRestoredEventTimer.startOneShot(0, FROM_HERE);
156 } else { 156 } else {
157 // legacy synchronous context restoration. 157 // legacy synchronous context restoration.
158 reset(); 158 reset();
159 m_isContextLost = false; 159 m_isContextLost = false;
160 } 160 }
161 } 161 }
162 } 162 }
163 163
164 void CanvasRenderingContext2D::trace(Visitor* visitor)
165 {
166 #if ENABLE(OILPAN)
167 visitor->trace(m_stateStack);
168 visitor->trace(m_fetchedFonts);
169 visitor->trace(m_hitRegionManager);
170 #endif
171 CanvasRenderingContext::trace(visitor);
172 }
173
174 void CanvasRenderingContext2D::dispatchContextLostEvent(Timer<CanvasRenderingCon text2D>*) 164 void CanvasRenderingContext2D::dispatchContextLostEvent(Timer<CanvasRenderingCon text2D>*)
175 { 165 {
176 if (contextLostRestoredEventsEnabled()) { 166 if (contextLostRestoredEventsEnabled()) {
177 RefPtr<Event> event = Event::createCancelable(EventTypeNames::contextlos t); 167 RefPtr<Event> event = Event::createCancelable(EventTypeNames::contextlos t);
178 canvas()->dispatchEvent(event); 168 canvas()->dispatchEvent(event);
179 if (event->defaultPrevented()) { 169 if (event->defaultPrevented()) {
180 m_contextRestorable = false; 170 m_contextRestorable = false;
181 } 171 }
182 } 172 }
183 173
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 } 337 }
348 338
349 void CanvasRenderingContext2D::State::fontsNeedUpdate(CSSFontSelector* fontSelec tor) 339 void CanvasRenderingContext2D::State::fontsNeedUpdate(CSSFontSelector* fontSelec tor)
350 { 340 {
351 ASSERT_ARG(fontSelector, fontSelector == m_font.fontSelector()); 341 ASSERT_ARG(fontSelector, fontSelector == m_font.fontSelector());
352 ASSERT(m_realizedFont); 342 ASSERT(m_realizedFont);
353 343
354 m_font.update(fontSelector); 344 m_font.update(fontSelector);
355 } 345 }
356 346
357 void CanvasRenderingContext2D::State::trace(Visitor* visitor)
358 {
359 visitor->trace(m_strokeStyle);
360 visitor->trace(m_fillStyle);
361 CSSFontSelectorClient::trace(visitor);
362 }
363
364 void CanvasRenderingContext2D::realizeSaves(GraphicsContext* context) 347 void CanvasRenderingContext2D::realizeSaves(GraphicsContext* context)
365 { 348 {
366 validateStateStack(); 349 validateStateStack();
367 if (state().m_unrealizedSaveCount) { 350 if (state().m_unrealizedSaveCount) {
368 ASSERT(m_stateStack.size() >= 1); 351 ASSERT(m_stateStack.size() >= 1);
369 // Reduce the current state's unrealized count by one now, 352 // Reduce the current state's unrealized count by one now,
370 // to reflect the fact we are saving one state. 353 // to reflect the fact we are saving one state.
371 m_stateStack.last()->m_unrealizedSaveCount--; 354 m_stateStack.last()->m_unrealizedSaveCount--;
372 m_stateStack.append(adoptPtr(new State(state()))); 355 m_stateStack.append(adoptPtr(new State(state())));
373 // Set the new state's unrealized count to 0, because it has no outstand ing saves. 356 // Set the new state's unrealized count to 0, because it has no outstand ing saves.
(...skipping 2087 matching lines...) Expand 10 before | Expand all | Expand 10 after
2461 2444
2462 unsigned CanvasRenderingContext2D::hitRegionsCount() const 2445 unsigned CanvasRenderingContext2D::hitRegionsCount() const
2463 { 2446 {
2464 if (m_hitRegionManager) 2447 if (m_hitRegionManager)
2465 return m_hitRegionManager->getHitRegionsCount(); 2448 return m_hitRegionManager->getHitRegionsCount();
2466 2449
2467 return 0; 2450 return 0;
2468 } 2451 }
2469 2452
2470 } // namespace blink 2453 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/html/canvas/CanvasRenderingContext2D.h ('k') | sky/engine/core/html/canvas/CanvasStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698