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

Side by Side Diff: sky/engine/core/html/canvas/WebGLSharedWebGraphicsContext3D.h

Issue 1001913003: Remove <canvas> (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 2014 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 SKY_ENGINE_CORE_HTML_CANVAS_WEBGLSHAREDWEBGRAPHICSCONTEXT3D_H_
6 #define SKY_ENGINE_CORE_HTML_CANVAS_WEBGLSHAREDWEBGRAPHICSCONTEXT3D_H_
7
8 #include "sky/engine/wtf/Forward.h"
9 #include "sky/engine/wtf/RefCounted.h"
10 #include "sky/engine/wtf/RefPtr.h"
11
12 namespace blink {
13
14 class WebGraphicsContext3D;
15 class DrawingBuffer;
16
17 #if ENABLE(OILPAN)
18 // The attached WebGLContextObjects are finalized using the
19 // blink::WebGraphicsContext3D object of this object's DrawingBuffer.
20 // Naturally the DrawingBuffer must then be kept alive until those
21 // finalizers have run. With Oilpan, accomplish that by having the
22 // WebGLContextObjects keep a RefPtr<> to an off-heap object that
23 // safely handles the eventual release of the underlying
24 // DrawingBuffer.
25 class WebGLSharedWebGraphicsContext3D final : public RefCounted<WebGLSharedWebGr aphicsContext3D> {
26 public:
27 static PassRefPtr<WebGLSharedWebGraphicsContext3D> create(PassRefPtr<Drawing Buffer>);
28
29 ~WebGLSharedWebGraphicsContext3D();
30
31 // Disposing and updating the underlying DrawingBuffer;
32 // needed when handling loss and restoration of graphics contexts.
33 void dispose();
34 void update(PassRefPtr<DrawingBuffer>);
35
36 DrawingBuffer* drawingBuffer() const;
37
38 blink::WebGraphicsContext3D* webContext() const;
39 private:
40 explicit WebGLSharedWebGraphicsContext3D(PassRefPtr<DrawingBuffer>);
41
42 RefPtr<DrawingBuffer> m_buffer;
43 };
44 #endif
45
46 }
47
48 #endif // SKY_ENGINE_CORE_HTML_CANVAS_WEBGLSHAREDWEBGRAPHICSCONTEXT3D_H_
OLDNEW
« no previous file with comments | « sky/engine/core/html/canvas/WebGLSharedObject.cpp ('k') | sky/engine/core/html/canvas/WebGLSharedWebGraphicsContext3D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698