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

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

Issue 1824433002: Remove getError() and synthesizeGLError() from WebGraphicsContext3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simples-tplus
Patch Set: errors: rebase Created 4 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/test/MockWebGraphicsContext3D.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 public: 130 public:
131 virtual void onErrorMessage(const WebString&, WGC3Dint) = 0; 131 virtual void onErrorMessage(const WebString&, WGC3Dint) = 0;
132 132
133 protected: 133 protected:
134 virtual ~WebGraphicsErrorMessageCallback() { } 134 virtual ~WebGraphicsErrorMessageCallback() { }
135 }; 135 };
136 136
137 // This destructor needs to be public so that using classes can destroy inst ances if initialization fails. 137 // This destructor needs to be public so that using classes can destroy inst ances if initialization fails.
138 virtual ~WebGraphicsContext3D() { } 138 virtual ~WebGraphicsContext3D() { }
139 139
140 // Synthesizes an OpenGL error which will be returned from a
141 // later call to getError. This is used to emulate OpenGL ES
142 // 2.0 behavior on the desktop and to enforce additional error
143 // checking mandated by WebGL.
144 //
145 // Per the behavior of glGetError, this stores at most one
146 // instance of any given error, and returns them from calls to
147 // getError in the order they were added.
148 virtual void synthesizeGLError(WGC3Denum) = 0;
149
150 // GL_CHROMIUM_request_extension 140 // GL_CHROMIUM_request_extension
151 virtual WebString getRequestableExtensionsCHROMIUM() = 0; 141 virtual WebString getRequestableExtensionsCHROMIUM() = 0;
152 142
153 // GL_CHROMIUM_framebuffer_multisample 143 // GL_CHROMIUM_framebuffer_multisample
154 virtual void blitFramebufferCHROMIUM(WGC3Dint srcX0, WGC3Dint srcY0, WGC3Din t srcX1, WGC3Dint srcY1, WGC3Dint dstX0, WGC3Dint dstY0, WGC3Dint dstX1, WGC3Din t dstY1, WGC3Dbitfield mask, WGC3Denum filter) = 0; 144 virtual void blitFramebufferCHROMIUM(WGC3Dint srcX0, WGC3Dint srcY0, WGC3Din t srcX1, WGC3Dint srcY1, WGC3Dint dstX0, WGC3Dint dstY0, WGC3Dint dstX1, WGC3Din t dstY1, WGC3Dbitfield mask, WGC3Denum filter) = 0;
155 145
156 // The entry points below map directly to the OpenGL ES 2.0 API. 146 // The entry points below map directly to the OpenGL ES 2.0 API.
157 // See: http://www.khronos.org/registry/gles/ 147 // See: http://www.khronos.org/registry/gles/
158 // and: http://www.khronos.org/opengles/sdk/docs/man/ 148 // and: http://www.khronos.org/opengles/sdk/docs/man/
159 virtual void drawElements(WGC3Denum mode, WGC3Dsizei count, WGC3Denum type, WGC3Dintptr offset) = 0; 149 virtual void drawElements(WGC3Denum mode, WGC3Dsizei count, WGC3Denum type, WGC3Dintptr offset) = 0;
160 150
161 virtual bool getActiveAttrib(WebGLId program, WGC3Duint index, ActiveInfo&) = 0; 151 virtual bool getActiveAttrib(WebGLId program, WGC3Duint index, ActiveInfo&) = 0;
162 virtual bool getActiveUniform(WebGLId program, WGC3Duint index, ActiveInfo&) = 0; 152 virtual bool getActiveUniform(WebGLId program, WGC3Duint index, ActiveInfo&) = 0;
163 virtual WGC3Denum getError() = 0;
164 virtual WebString getProgramInfoLog(WebGLId program) = 0; 153 virtual WebString getProgramInfoLog(WebGLId program) = 0;
165 virtual WebString getShaderInfoLog(WebGLId shader) = 0; 154 virtual WebString getShaderInfoLog(WebGLId shader) = 0;
166 virtual WebString getShaderSource(WebGLId shader) = 0; 155 virtual WebString getShaderSource(WebGLId shader) = 0;
167 virtual WebString getString(WGC3Denum name) = 0; 156 virtual WebString getString(WGC3Denum name) = 0;
168 virtual WGC3Dintptr getVertexAttribOffset(WGC3Duint index, WGC3Denum pname) = 0; 157 virtual WGC3Dintptr getVertexAttribOffset(WGC3Duint index, WGC3Denum pname) = 0;
169 158
170 virtual void shaderSource(WebGLId shader, const WGC3Dchar* string) = 0; 159 virtual void shaderSource(WebGLId shader, const WGC3Dchar* string) = 0;
171 160
172 virtual void vertexAttribPointer(WGC3Duint index, WGC3Dint size, WGC3Denum t ype, WGC3Dboolean normalized, 161 virtual void vertexAttribPointer(WGC3Duint index, WGC3Dint size, WGC3Denum t ype, WGC3Dboolean normalized,
173 WGC3Dsizei stride, WGC3Dintptr offset) = 0; 162 WGC3Dsizei stride, WGC3Dintptr offset) = 0;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 virtual void vertexAttribIPointer(WGC3Duint index, WGC3Dint size, WGC3Denum type, WGC3Dsizei stride, WGC3Dintptr pointer) { } 247 virtual void vertexAttribIPointer(WGC3Duint index, WGC3Dint size, WGC3Denum type, WGC3Dsizei stride, WGC3Dintptr pointer) { }
259 virtual void waitSync(WGC3Dsync sync, WGC3Dbitfield flags, WGC3Duint64 timeo ut) { } 248 virtual void waitSync(WGC3Dsync sync, WGC3Dbitfield flags, WGC3Duint64 timeo ut) { }
260 249
261 // Prefer getting a GLES2Interface off WebGraphicsContext3DProvider if possi ble, and avoid using WebGraphicsContext3D at all. 250 // Prefer getting a GLES2Interface off WebGraphicsContext3DProvider if possi ble, and avoid using WebGraphicsContext3D at all.
262 virtual gpu::gles2::GLES2Interface* getGLES2Interface() = 0; 251 virtual gpu::gles2::GLES2Interface* getGLES2Interface() = 0;
263 }; 252 };
264 253
265 } // namespace blink 254 } // namespace blink
266 255
267 #endif 256 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/test/MockWebGraphicsContext3D.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698