OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 16 matching lines...) Expand all Loading... |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebGraphicsContext3D_h | 31 #ifndef WebGraphicsContext3D_h |
32 #define WebGraphicsContext3D_h | 32 #define WebGraphicsContext3D_h |
33 | 33 |
34 #include "WebNonCopyable.h" | 34 #include "WebNonCopyable.h" |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 class WebString; | |
38 | |
39 // This interface abstracts the operations performed by the | |
40 // GraphicsContext3D in order to implement WebGL. Nearly all of the | |
41 // methods exposed on this interface map directly to entry points in | |
42 // the OpenGL ES 2.0 API. | |
43 class WebGraphicsContext3D : public WebNonCopyable { | 37 class WebGraphicsContext3D : public WebNonCopyable { |
44 public: | 38 public: |
45 class WebGraphicsContextLostCallback { | |
46 public: | |
47 virtual void onContextLost() = 0; | |
48 | |
49 protected: | |
50 virtual ~WebGraphicsContextLostCallback() { } | |
51 }; | |
52 | |
53 // This destructor needs to be public so that using classes can destroy inst
ances if initialization fails. | |
54 virtual ~WebGraphicsContext3D() { } | 39 virtual ~WebGraphicsContext3D() { } |
55 }; | 40 }; |
56 | 41 |
57 } // namespace blink | 42 } // namespace blink |
58 | 43 |
59 #endif | 44 #endif |
OLD | NEW |