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 WebGraphicsInfo() | |
119 : vendorId(0) | |
tkent
2015/10/20 23:08:32
nit: C++11 non-static member initializer would sim
sivag
2015/10/21 10:10:17
Done.
| |
120 , deviceId(0) | |
121 , processCrashCount(0) | |
122 , resetNotificationStrategy(false) | |
123 , sandboxed(false) | |
124 , testFailContext(false) | |
125 , amdSwitchable(false) | |
126 , optimus(false) | |
127 { | |
128 } | |
129 unsigned vendorId; | |
130 unsigned deviceId; | |
131 unsigned processCrashCount; | |
132 unsigned resetNotificationStrategy; | |
133 bool sandboxed; | |
134 bool testFailContext; | |
135 bool amdSwitchable; | |
136 bool optimus; | |
137 WebString vendorInfo; | |
138 WebString rendererInfo; | |
139 WebString driverVersion; | |
140 WebString errorMessage; | |
141 }; | |
142 | |
126 class WebGraphicsContextLostCallback { | 143 class WebGraphicsContextLostCallback { |
127 public: | 144 public: |
128 virtual void onContextLost() = 0; | 145 virtual void onContextLost() = 0; |
129 | 146 |
130 protected: | 147 protected: |
131 virtual ~WebGraphicsContextLostCallback() { } | 148 virtual ~WebGraphicsContextLostCallback() { } |
132 }; | 149 }; |
133 | 150 |
134 class WebGraphicsErrorMessageCallback { | 151 class WebGraphicsErrorMessageCallback { |
135 public: | 152 public: |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
560 virtual void vertexAttribI4iv(WGC3Duint index, const WGC3Dint *v) { } | 577 virtual void vertexAttribI4iv(WGC3Duint index, const WGC3Dint *v) { } |
561 virtual void vertexAttribI4ui(WGC3Duint index, WGC3Duint x, WGC3Duint y, WGC 3Duint z, WGC3Duint w) { } | 578 virtual void vertexAttribI4ui(WGC3Duint index, WGC3Duint x, WGC3Duint y, WGC 3Duint z, WGC3Duint w) { } |
562 virtual void vertexAttribI4uiv(WGC3Duint index, const WGC3Duint *v) { } | 579 virtual void vertexAttribI4uiv(WGC3Duint index, const WGC3Duint *v) { } |
563 virtual void vertexAttribIPointer(WGC3Duint index, WGC3Dint size, WGC3Denum type, WGC3Dsizei stride, WGC3Dintptr pointer) { } | 580 virtual void vertexAttribIPointer(WGC3Duint index, WGC3Dint size, WGC3Denum type, WGC3Dsizei stride, WGC3Dintptr pointer) { } |
564 virtual void waitSync(WGC3Dsync sync, WGC3Dbitfield flags, WGC3Duint64 timeo ut) { } | 581 virtual void waitSync(WGC3Dsync sync, WGC3Dbitfield flags, WGC3Duint64 timeo ut) { } |
565 }; | 582 }; |
566 | 583 |
567 } // namespace blink | 584 } // namespace blink |
568 | 585 |
569 #endif | 586 #endif |
OLD | NEW |