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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 typedef float WGC3Dclampf; | 56 typedef float WGC3Dclampf; |
57 typedef signed long int WGC3Dintptr; | 57 typedef signed long int WGC3Dintptr; |
58 typedef signed long int WGC3Dsizeiptr; | 58 typedef signed long int WGC3Dsizeiptr; |
59 typedef int64_t WGC3Dint64; | 59 typedef int64_t WGC3Dint64; |
60 typedef uint64_t WGC3Duint64; | 60 typedef uint64_t WGC3Duint64; |
61 typedef struct __WGC3Dsync *WGC3Dsync; | 61 typedef struct __WGC3Dsync *WGC3Dsync; |
62 | 62 |
63 // Typedef for server-side objects like OpenGL textures and program objects. | 63 // Typedef for server-side objects like OpenGL textures and program objects. |
64 typedef WGC3Duint WebGLId; | 64 typedef WGC3Duint WebGLId; |
65 | 65 |
66 struct WebGLInfo { | |
67 WGC3Duint vendorId; | |
68 WGC3Duint deviceId; | |
69 WebString vendorInfo; | |
70 WebString rendererInfo; | |
71 WebString driverVersion; | |
72 WebString contextInfoCollectionFailure; | |
73 }; | |
74 | |
75 // This interface abstracts the operations performed by the | 66 // This interface abstracts the operations performed by the |
76 // GraphicsContext3D in order to implement WebGL. Nearly all of the | 67 // GraphicsContext3D in order to implement WebGL. Nearly all of the |
77 // methods exposed on this interface map directly to entry points in | 68 // methods exposed on this interface map directly to entry points in |
78 // the OpenGL ES 2.0 API. | 69 // the OpenGL ES 2.0 API. |
79 class WebGraphicsContext3D : public WebNonCopyable { | 70 class WebGraphicsContext3D : public WebNonCopyable { |
80 public: | 71 public: |
81 // Return value from getActiveUniform and getActiveAttrib. | 72 // Return value from getActiveUniform and getActiveAttrib. |
82 struct ActiveInfo { | 73 struct ActiveInfo { |
83 WebString name; | 74 WebString name; |
84 WGC3Denum type; | 75 WGC3Denum type; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 bool noAutomaticFlushes; | 107 bool noAutomaticFlushes; |
117 bool failIfMajorPerformanceCaveat; | 108 bool failIfMajorPerformanceCaveat; |
118 bool webGL; | 109 bool webGL; |
119 unsigned webGLVersion; | 110 unsigned webGLVersion; |
120 // FIXME: ideally this would be a WebURL, but it is currently not | 111 // FIXME: ideally this would be a WebURL, but it is currently not |
121 // possible to pass a WebURL by value across the WebKit API boundary. | 112 // possible to pass a WebURL by value across the WebKit API boundary. |
122 // See https://bugs.webkit.org/show_bug.cgi?id=103793#c13 . | 113 // See https://bugs.webkit.org/show_bug.cgi?id=103793#c13 . |
123 WebString topDocumentURL; | 114 WebString topDocumentURL; |
124 }; | 115 }; |
125 | 116 |
| 117 struct WebGraphicsInfo { |
| 118 unsigned vendorId = 0; |
| 119 unsigned deviceId = 0; |
| 120 unsigned processCrashCount = 0; |
| 121 unsigned resetNotificationStrategy = 0; |
| 122 bool sandboxed = false; |
| 123 bool testFailContext = false; |
| 124 bool amdSwitchable = false; |
| 125 bool optimus = false; |
| 126 WebString vendorInfo; |
| 127 WebString rendererInfo; |
| 128 WebString driverVersion; |
| 129 WebString errorMessage; |
| 130 }; |
| 131 |
126 class WebGraphicsContextLostCallback { | 132 class WebGraphicsContextLostCallback { |
127 public: | 133 public: |
128 virtual void onContextLost() = 0; | 134 virtual void onContextLost() = 0; |
129 | 135 |
130 protected: | 136 protected: |
131 virtual ~WebGraphicsContextLostCallback() { } | 137 virtual ~WebGraphicsContextLostCallback() { } |
132 }; | 138 }; |
133 | 139 |
134 class WebGraphicsErrorMessageCallback { | 140 class WebGraphicsErrorMessageCallback { |
135 public: | 141 public: |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 virtual void vertexAttribI4iv(WGC3Duint index, const WGC3Dint *v) { } | 566 virtual void vertexAttribI4iv(WGC3Duint index, const WGC3Dint *v) { } |
561 virtual void vertexAttribI4ui(WGC3Duint index, WGC3Duint x, WGC3Duint y, WGC
3Duint z, WGC3Duint w) { } | 567 virtual void vertexAttribI4ui(WGC3Duint index, WGC3Duint x, WGC3Duint y, WGC
3Duint z, WGC3Duint w) { } |
562 virtual void vertexAttribI4uiv(WGC3Duint index, const WGC3Duint *v) { } | 568 virtual void vertexAttribI4uiv(WGC3Duint index, const WGC3Duint *v) { } |
563 virtual void vertexAttribIPointer(WGC3Duint index, WGC3Dint size, WGC3Denum
type, WGC3Dsizei stride, WGC3Dintptr pointer) { } | 569 virtual void vertexAttribIPointer(WGC3Duint index, WGC3Dint size, WGC3Denum
type, WGC3Dsizei stride, WGC3Dintptr pointer) { } |
564 virtual void waitSync(WGC3Dsync sync, WGC3Dbitfield flags, WGC3Duint64 timeo
ut) { } | 570 virtual void waitSync(WGC3Dsync sync, WGC3Dbitfield flags, WGC3Duint64 timeo
ut) { } |
565 }; | 571 }; |
566 | 572 |
567 } // namespace blink | 573 } // namespace blink |
568 | 574 |
569 #endif | 575 #endif |
OLD | NEW |