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

Side by Side Diff: third_party/WebKit/public/platform/WebGraphicsContext3D.h

Issue 1384233003: Improve usefulness of webglcontextcreationerror statusMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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
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
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 WebGraphicsContext3DInfo {
118 WebGraphicsContext3DInfo()
119 : vendorId(0)
120 , deviceId(0)
121 , processCrashCount(0)
122 , resetNotificationStrategy(false)
123 , sandboxed(false)
124 , lenovoDcute(false)
125 , testFailContext(false)
126 {
127 }
128 unsigned vendorId;
129 unsigned deviceId;
130 unsigned processCrashCount;
131 bool resetNotificationStrategy;
132 bool sandboxed;
133 bool lenovoDcute;
Ken Russell (switch to Gerrit) 2015/10/12 23:52:42 I think the lenovoDcute flag doesn't provide any u
sivag 2015/10/15 17:16:38 Done.
134 bool amdSwitchable;
135 bool optimus;
136 WebString vendorInfo;
137 WebString rendererInfo;
138 WebString driverVersion;
139 WebString errorMessage;
140 WebString displayLinkVersion;
Ken Russell (switch to Gerrit) 2015/10/12 23:52:43 Similarly for the displayLinkVersion.
sivag 2015/10/15 17:16:38 Done.
141 bool testFailContext;
142 };
143
126 class WebGraphicsContextLostCallback { 144 class WebGraphicsContextLostCallback {
127 public: 145 public:
128 virtual void onContextLost() = 0; 146 virtual void onContextLost() = 0;
129 147
130 protected: 148 protected:
131 virtual ~WebGraphicsContextLostCallback() { } 149 virtual ~WebGraphicsContextLostCallback() { }
132 }; 150 };
133 151
134 class WebGraphicsErrorMessageCallback { 152 class WebGraphicsErrorMessageCallback {
135 public: 153 public:
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 virtual void vertexAttribI4iv(WGC3Duint index, const WGC3Dint *v) { } 578 virtual void vertexAttribI4iv(WGC3Duint index, const WGC3Dint *v) { }
561 virtual void vertexAttribI4ui(WGC3Duint index, WGC3Duint x, WGC3Duint y, WGC 3Duint z, WGC3Duint w) { } 579 virtual void vertexAttribI4ui(WGC3Duint index, WGC3Duint x, WGC3Duint y, WGC 3Duint z, WGC3Duint w) { }
562 virtual void vertexAttribI4uiv(WGC3Duint index, const WGC3Duint *v) { } 580 virtual void vertexAttribI4uiv(WGC3Duint index, const WGC3Duint *v) { }
563 virtual void vertexAttribIPointer(WGC3Duint index, WGC3Dint size, WGC3Denum type, WGC3Dsizei stride, WGC3Dintptr pointer) { } 581 virtual void vertexAttribIPointer(WGC3Duint index, WGC3Dint size, WGC3Denum type, WGC3Dsizei stride, WGC3Dintptr pointer) { }
564 virtual void waitSync(WGC3Dsync sync, WGC3Dbitfield flags, WGC3Duint64 timeo ut) { } 582 virtual void waitSync(WGC3Dsync sync, WGC3Dbitfield flags, WGC3Duint64 timeo ut) { }
565 }; 583 };
566 584
567 } // namespace blink 585 } // namespace blink
568 586
569 #endif 587 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698