Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "core/CoreExport.h" | |
| 6 #include "core/html/canvas/OffscreenCanvas.h" | |
| 7 | |
| 8 namespace blink { | |
| 9 | |
| 10 class CORE_EXPORT OffscreenCanvasRenderingContext : public NoBaseWillBeGarbageCo llectedFinalized<OffscreenCanvasRenderingContext>, public ScriptWrappable { | |
|
Justin Novosad
2016/03/02 15:41:50
This class should also go in the new 'offscreencan
| |
| 11 WTF_MAKE_NONCOPYABLE(OffscreenCanvasRenderingContext); | |
| 12 USING_FAST_MALLOC_WILL_BE_REMOVED(OffscreenCanvasRenderingContext); | |
| 13 public: | |
| 14 virtual ~OffscreenCanvasRenderingContext() { } | |
| 15 enum ContextType { | |
| 16 Context2d = 0, | |
| 17 ContextWebgl = 1, | |
| 18 ContextWebgl2 = 2, | |
| 19 ContextImageBitmap = 3, | |
|
Justin Novosad
2016/03/02 15:41:50
ImageBitmap context will not be supported with Off
xlai (Olivia)
2016/03/03 22:50:06
Done.
| |
| 20 ContextTypeCount | |
| 21 }; | |
| 22 static ContextType contextTypeFromId(const String& id); | |
| 23 | |
| 24 OffscreenCanvas* offscreenCanvas() const { return m_offscreenCanvas; } | |
| 25 ContextType contextType() const { return m_contextType; } | |
| 26 | |
| 27 protected: | |
| 28 OffscreenCanvasRenderingContext(OffscreenCanvas*); | |
| 29 DECLARE_VIRTUAL_TRACE(); | |
| 30 | |
| 31 private: | |
| 32 Member<OffscreenCanvas> m_offscreenCanvas; | |
| 33 ContextType m_contextType; | |
| 34 }; | |
| 35 | |
| 36 } // namespace blink | |
| OLD | NEW |