| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifndef CanvasRenderingContext2D_h | 27 #ifndef CanvasRenderingContext2D_h |
| 28 #define CanvasRenderingContext2D_h | 28 #define CanvasRenderingContext2D_h |
| 29 | 29 |
| 30 #include "bindings/core/v8/ScriptWrappable.h" | 30 #include "bindings/core/v8/ScriptWrappable.h" |
| 31 #include "core/html/canvas/CanvasContextCreationAttributes.h" | 31 #include "core/html/canvas/CanvasContextCreationAttributes.h" |
| 32 #include "core/html/canvas/CanvasRenderingContext.h" | 32 #include "core/html/canvas/CanvasRenderingContext.h" |
| 33 #include "core/html/canvas/CanvasRenderingContextFactory.h" | 33 #include "core/html/canvas/CanvasRenderingContextFactory.h" |
| 34 #include "core/style/FilterOperations.h" |
| 34 #include "core/svg/SVGResourceClient.h" | 35 #include "core/svg/SVGResourceClient.h" |
| 35 #include "modules/ModulesExport.h" | 36 #include "modules/ModulesExport.h" |
| 36 #include "modules/canvas2d/BaseRenderingContext2D.h" | 37 #include "modules/canvas2d/BaseRenderingContext2D.h" |
| 37 #include "modules/canvas2d/Canvas2DContextAttributes.h" | 38 #include "modules/canvas2d/Canvas2DContextAttributes.h" |
| 38 #include "modules/canvas2d/CanvasRenderingContext2DState.h" | 39 #include "modules/canvas2d/CanvasRenderingContext2DState.h" |
| 39 #include "platform/graphics/GraphicsTypes.h" | 40 #include "platform/graphics/GraphicsTypes.h" |
| 40 #include "platform/heap/GarbageCollected.h" | 41 #include "platform/heap/GarbageCollected.h" |
| 41 #include "public/platform/WebThread.h" | 42 #include "public/platform/WebThread.h" |
| 42 #include "wtf/Vector.h" | 43 #include "wtf/Vector.h" |
| 43 #include "wtf/text/WTFString.h" | 44 #include "wtf/text/WTFString.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 void didProcessTask() override; | 145 void didProcessTask() override; |
| 145 void willProcessTask() override {} | 146 void willProcessTask() override {} |
| 146 | 147 |
| 147 void styleDidChange(const ComputedStyle* oldStyle, | 148 void styleDidChange(const ComputedStyle* oldStyle, |
| 148 const ComputedStyle& newStyle) override; | 149 const ComputedStyle& newStyle) override; |
| 149 HitTestCanvasResult* getControlAndIdIfHitRegionExists( | 150 HitTestCanvasResult* getControlAndIdIfHitRegionExists( |
| 150 const LayoutPoint& location) override; | 151 const LayoutPoint& location) override; |
| 151 String getIdFromControl(const Element*) override; | 152 String getIdFromControl(const Element*) override; |
| 152 | 153 |
| 153 // SVGResourceClient implementation | 154 // SVGResourceClient implementation |
| 154 void filterNeedsInvalidation() override; | 155 TreeScope* treeScope() override; |
| 156 void resourceContentChanged() override; |
| 157 void resourceElementChanged() override; |
| 158 |
| 159 void updateFilterReferences(const FilterOperations&); |
| 160 void clearFilterReferences(); |
| 155 | 161 |
| 156 // BaseRenderingContext2D implementation | 162 // BaseRenderingContext2D implementation |
| 157 bool originClean() const final; | 163 bool originClean() const final; |
| 158 void setOriginTainted() final; | 164 void setOriginTainted() final; |
| 159 bool wouldTaintOrigin(CanvasImageSource* source, ExecutionContext*) final { | 165 bool wouldTaintOrigin(CanvasImageSource* source, ExecutionContext*) final { |
| 160 return CanvasRenderingContext::wouldTaintOrigin(source); | 166 return CanvasRenderingContext::wouldTaintOrigin(source); |
| 161 } | 167 } |
| 162 | 168 |
| 163 int width() const final; | 169 int width() const final; |
| 164 int height() const final; | 170 int height() const final; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 WebLayer* platformLayer() const override; | 246 WebLayer* platformLayer() const override; |
| 241 | 247 |
| 242 Member<HitRegionManager> m_hitRegionManager; | 248 Member<HitRegionManager> m_hitRegionManager; |
| 243 LostContextMode m_contextLostMode; | 249 LostContextMode m_contextLostMode; |
| 244 bool m_contextRestorable; | 250 bool m_contextRestorable; |
| 245 unsigned m_tryRestoreContextAttemptCount; | 251 unsigned m_tryRestoreContextAttemptCount; |
| 246 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; | 252 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; |
| 247 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; | 253 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; |
| 248 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; | 254 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; |
| 249 | 255 |
| 256 FilterOperations m_filterOperations; |
| 250 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle; | 257 HashMap<String, Font> m_fontsResolvedUsingCurrentStyle; |
| 251 bool m_pruneLocalFontCacheScheduled; | 258 bool m_pruneLocalFontCacheScheduled; |
| 252 ListHashSet<String> m_fontLRUList; | 259 ListHashSet<String> m_fontLRUList; |
| 253 }; | 260 }; |
| 254 | 261 |
| 255 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, | 262 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, |
| 256 CanvasRenderingContext, | 263 CanvasRenderingContext, |
| 257 context, | 264 context, |
| 258 context->is2d() && context->canvas(), | 265 context->is2d() && context->canvas(), |
| 259 context.is2d() && context.canvas()); | 266 context.is2d() && context.canvas()); |
| 260 | 267 |
| 261 } // namespace blink | 268 } // namespace blink |
| 262 | 269 |
| 263 #endif // CanvasRenderingContext2D_h | 270 #endif // CanvasRenderingContext2D_h |
| OLD | NEW |