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

Side by Side Diff: third_party/WebKit/Source/core/html/canvas/OffscreenCanvasRenderingContext.h

Issue 1748163003: Add rendering context and rendering 2D context to OffscreenCanvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove CanvasRenderingContextBase Created 4 years, 9 months 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
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698