OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
5 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. | 9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. |
10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 } else { | 214 } else { |
215 // legacy synchronous context restoration. | 215 // legacy synchronous context restoration. |
216 reset(); | 216 reset(); |
217 m_contextLostMode = NotLostContext; | 217 m_contextLostMode = NotLostContext; |
218 } | 218 } |
219 } | 219 } |
220 } | 220 } |
221 | 221 |
222 DEFINE_TRACE(CanvasRenderingContext2D) { | 222 DEFINE_TRACE(CanvasRenderingContext2D) { |
223 visitor->trace(m_hitRegionManager); | 223 visitor->trace(m_hitRegionManager); |
| 224 visitor->trace(m_filterOperations); |
224 CanvasRenderingContext::trace(visitor); | 225 CanvasRenderingContext::trace(visitor); |
225 BaseRenderingContext2D::trace(visitor); | 226 BaseRenderingContext2D::trace(visitor); |
226 SVGResourceClient::trace(visitor); | 227 SVGResourceClient::trace(visitor); |
227 } | 228 } |
228 | 229 |
229 void CanvasRenderingContext2D::dispatchContextLostEvent(TimerBase*) { | 230 void CanvasRenderingContext2D::dispatchContextLostEvent(TimerBase*) { |
230 if (canvas() && contextLostRestoredEventsEnabled()) { | 231 if (canvas() && contextLostRestoredEventsEnabled()) { |
231 Event* event = Event::createCancelable(EventTypeNames::contextlost); | 232 Event* event = Event::createCancelable(EventTypeNames::contextlost); |
232 canvas()->dispatchEvent(event); | 233 canvas()->dispatchEvent(event); |
233 if (event->defaultPrevented()) { | 234 if (event->defaultPrevented()) { |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 } | 559 } |
559 } | 560 } |
560 | 561 |
561 void CanvasRenderingContext2D::styleDidChange(const ComputedStyle* oldStyle, | 562 void CanvasRenderingContext2D::styleDidChange(const ComputedStyle* oldStyle, |
562 const ComputedStyle& newStyle) { | 563 const ComputedStyle& newStyle) { |
563 if (oldStyle && oldStyle->font() == newStyle.font()) | 564 if (oldStyle && oldStyle->font() == newStyle.font()) |
564 return; | 565 return; |
565 pruneLocalFontCache(0); | 566 pruneLocalFontCache(0); |
566 } | 567 } |
567 | 568 |
568 void CanvasRenderingContext2D::filterNeedsInvalidation() { | 569 void CanvasRenderingContext2D::clearFilterReferences() { |
| 570 m_filterOperations.removeClient(this); |
| 571 m_filterOperations.clear(); |
| 572 } |
| 573 |
| 574 void CanvasRenderingContext2D::updateFilterReferences( |
| 575 const FilterOperations& filters) { |
| 576 clearFilterReferences(); |
| 577 filters.addClient(this); |
| 578 m_filterOperations = filters; |
| 579 } |
| 580 |
| 581 void CanvasRenderingContext2D::resourceContentChanged() { |
| 582 resourceElementChanged(); |
| 583 } |
| 584 |
| 585 void CanvasRenderingContext2D::resourceElementChanged() { |
| 586 clearFilterReferences(); |
569 state().clearResolvedFilter(); | 587 state().clearResolvedFilter(); |
570 } | 588 } |
571 | 589 |
572 bool CanvasRenderingContext2D::originClean() const { | 590 bool CanvasRenderingContext2D::originClean() const { |
573 return canvas()->originClean(); | 591 return canvas()->originClean(); |
574 } | 592 } |
575 | 593 |
576 void CanvasRenderingContext2D::setOriginTainted() { | 594 void CanvasRenderingContext2D::setOriginTainted() { |
577 return canvas()->setOriginTainted(); | 595 return canvas()->setOriginTainted(); |
578 } | 596 } |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1158 } | 1176 } |
1159 return true; | 1177 return true; |
1160 } | 1178 } |
1161 | 1179 |
1162 void CanvasRenderingContext2D::resetUsageTracking() { | 1180 void CanvasRenderingContext2D::resetUsageTracking() { |
1163 UsageCounters newCounters; | 1181 UsageCounters newCounters; |
1164 m_usageCounters = newCounters; | 1182 m_usageCounters = newCounters; |
1165 } | 1183 } |
1166 | 1184 |
1167 } // namespace blink | 1185 } // namespace blink |
OLD | NEW |