| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 class SkCanvas; | 35 class SkCanvas; |
| 36 | 36 |
| 37 namespace blink { class WebLayer; } | 37 namespace blink { class WebLayer; } |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class CanvasImageSource; | 41 class CanvasImageSource; |
| 42 class HTMLCanvasElement; | 42 class HTMLCanvasElement; |
| 43 class ImageData; | 43 class ImageData; |
| 44 | 44 |
| 45 class CORE_EXPORT CanvasRenderingContext : public NoBaseWillBeGarbageCollectedFi
nalized<CanvasRenderingContext>, public ScriptWrappable { | 45 class CORE_EXPORT CanvasRenderingContext : public GarbageCollectedFinalized<Canv
asRenderingContext>, public ScriptWrappable { |
| 46 WTF_MAKE_NONCOPYABLE(CanvasRenderingContext); | 46 WTF_MAKE_NONCOPYABLE(CanvasRenderingContext); |
| 47 USING_FAST_MALLOC_WILL_BE_REMOVED(CanvasRenderingContext); | |
| 48 public: | 47 public: |
| 49 virtual ~CanvasRenderingContext() { } | 48 virtual ~CanvasRenderingContext() { } |
| 50 | 49 |
| 51 // A Canvas can either be "2D" or "webgl" but never both. If you request a 2
D canvas and the existing | 50 // A Canvas can either be "2D" or "webgl" but never both. If you request a 2
D canvas and the existing |
| 52 // context is already 2D, just return that. If the existing context is WebGL
, then destroy it | 51 // context is already 2D, just return that. If the existing context is WebGL
, then destroy it |
| 53 // before creating a new 2D context. Vice versa when requesting a WebGL canv
as. Requesting a | 52 // before creating a new 2D context. Vice versa when requesting a WebGL canv
as. Requesting a |
| 54 // context with any other type string will destroy any existing context. | 53 // context with any other type string will destroy any existing context. |
| 55 enum ContextType { | 54 enum ContextType { |
| 56 // Do not change assigned numbers of existing items: add new features to
the end of the list. | 55 // Do not change assigned numbers of existing items: add new features to
the end of the list. |
| 57 Context2d = 0, | 56 Context2d = 0, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 122 |
| 124 bool wouldTaintOrigin(CanvasImageSource*); | 123 bool wouldTaintOrigin(CanvasImageSource*); |
| 125 void didMoveToNewDocument(Document*); | 124 void didMoveToNewDocument(Document*); |
| 126 | 125 |
| 127 protected: | 126 protected: |
| 128 CanvasRenderingContext(HTMLCanvasElement*); | 127 CanvasRenderingContext(HTMLCanvasElement*); |
| 129 DECLARE_VIRTUAL_TRACE(); | 128 DECLARE_VIRTUAL_TRACE(); |
| 130 virtual void stop() = 0; | 129 virtual void stop() = 0; |
| 131 | 130 |
| 132 private: | 131 private: |
| 133 RawPtrWillBeMember<HTMLCanvasElement> m_canvas; | 132 Member<HTMLCanvasElement> m_canvas; |
| 134 HashSet<String> m_cleanURLs; | 133 HashSet<String> m_cleanURLs; |
| 135 HashSet<String> m_dirtyURLs; | 134 HashSet<String> m_dirtyURLs; |
| 136 }; | 135 }; |
| 137 | 136 |
| 138 } // namespace blink | 137 } // namespace blink |
| 139 | 138 |
| 140 #endif | 139 #endif |
| OLD | NEW |