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

Side by Side Diff: third_party/WebKit/Source/modules/offscreencanvas/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: Rebase with master and fix merge conflicts 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 #ifndef OffscreenCanvasRenderingContext_h
6 #define OffscreenCanvasRenderingContext_h
7
8 #include "modules/offscreencanvas/OffscreenCanvas.h"
9
10 namespace blink {
11
12 class OffscreenCanvasRenderingContext : public GarbageCollectedFinalized<Offscre enCanvasRenderingContext>, public ScriptWrappable {
13 WTF_MAKE_NONCOPYABLE(OffscreenCanvasRenderingContext);
14 public:
15 virtual ~OffscreenCanvasRenderingContext() { }
16 enum ContextType {
17 Context2d = 0,
18 ContextWebgl = 1,
19 ContextWebgl2 = 2,
20 ContextTypeCount
21 };
22 static ContextType contextTypeFromId(const String& id);
23
24 OffscreenCanvas* offscreenCanvas() const { return m_offscreenCanvas; }
25 virtual ContextType contextType() const = 0;
26
27 virtual bool is2d() const { return false; }
28
29 protected:
30 OffscreenCanvasRenderingContext(OffscreenCanvas*);
31 DECLARE_VIRTUAL_TRACE();
32
33 private:
34 Member<OffscreenCanvas> m_offscreenCanvas;
35 };
36
37 } // namespace blink
38
39 #endif // OffscreenCanvasRenderingContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698