Fix a type mismatch on Windows caused by r201738.
[chromium-blink-merge.git] / cc / debug / fake_web_graphics_context_3d.h
blobc915a9e9b2b941c348f6af8dd2565a1d82bd06b2
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_DEBUG_FAKE_WEB_GRAPHICS_CONTEXT_3D_H_
6 #define CC_DEBUG_FAKE_WEB_GRAPHICS_CONTEXT_3D_H_
8 #include <string>
10 #include "base/compiler_specific.h"
11 #include "cc/base/cc_export.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3D.h"
14 namespace cc {
16 // WebGraphicsContext3D base class for use in unit tests.
17 // All operations are no-ops (returning 0 if necessary).
18 class CC_EXPORT FakeWebGraphicsContext3D
19 : public NON_EXPORTED_BASE(WebKit::WebGraphicsContext3D) {
20 public:
21 FakeWebGraphicsContext3D();
22 virtual ~FakeWebGraphicsContext3D();
24 virtual bool makeContextCurrent();
26 virtual int width();
27 virtual int height();
29 virtual void reshape(int width, int height);
31 virtual bool isGLES2Compliant();
33 virtual bool readBackFramebuffer(
34 unsigned char* pixels,
35 size_t buffer_size,
36 WebKit::WebGLId framebuffer,
37 int width,
38 int height);
40 virtual WebKit::WebGLId getPlatformTextureId();
42 virtual void prepareTexture() {}
44 virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) {}
46 virtual void synthesizeGLError(WebKit::WGC3Denum) {}
48 virtual bool isContextLost();
49 virtual WebKit::WGC3Denum getGraphicsResetStatusARB();
51 virtual void* mapBufferSubDataCHROMIUM(
52 WebKit::WGC3Denum target,
53 WebKit::WGC3Dintptr offset,
54 WebKit::WGC3Dsizeiptr size,
55 WebKit::WGC3Denum access);
57 virtual void unmapBufferSubDataCHROMIUM(const void*) {}
58 virtual void* mapTexSubImage2DCHROMIUM(
59 WebKit::WGC3Denum target,
60 WebKit::WGC3Dint level,
61 WebKit::WGC3Dint xoffset,
62 WebKit::WGC3Dint yoffset,
63 WebKit::WGC3Dsizei width,
64 WebKit::WGC3Dsizei height,
65 WebKit::WGC3Denum format,
66 WebKit::WGC3Denum type,
67 WebKit::WGC3Denum access);
68 virtual void unmapTexSubImage2DCHROMIUM(const void*) {}
70 virtual void setVisibilityCHROMIUM(bool visible) {}
72 virtual void discardFramebufferEXT(
73 WebKit::WGC3Denum target,
74 WebKit::WGC3Dsizei num_attachments,
75 const WebKit::WGC3Denum* attachments) {}
76 virtual void ensureFramebufferCHROMIUM() {}
78 virtual void setMemoryAllocationChangedCallbackCHROMIUM(
79 WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* callback) {}
81 virtual WebKit::WebString getRequestableExtensionsCHROMIUM();
82 virtual void requestExtensionCHROMIUM(const char*) {}
84 virtual void blitFramebufferCHROMIUM(
85 WebKit::WGC3Dint src_x0,
86 WebKit::WGC3Dint src_y0,
87 WebKit::WGC3Dint src_x1,
88 WebKit::WGC3Dint src_y1,
89 WebKit::WGC3Dint dst_x0,
90 WebKit::WGC3Dint dst_y0,
91 WebKit::WGC3Dint dst_x1,
92 WebKit::WGC3Dint dst_y1,
93 WebKit::WGC3Dbitfield mask,
94 WebKit::WGC3Denum filter) {}
95 virtual void renderbufferStorageMultisampleCHROMIUM(
96 WebKit::WGC3Denum target,
97 WebKit::WGC3Dsizei samples,
98 WebKit::WGC3Denum internalformat,
99 WebKit::WGC3Dsizei width,
100 WebKit::WGC3Dsizei height) {}
102 virtual void activeTexture(WebKit::WGC3Denum texture) {}
103 virtual void attachShader(WebKit::WebGLId program, WebKit::WebGLId shader);
104 virtual void bindAttribLocation(
105 WebKit::WebGLId program,
106 WebKit::WGC3Duint index,
107 const WebKit::WGC3Dchar* name) {}
108 virtual void bindBuffer(WebKit::WGC3Denum target, WebKit::WebGLId buffer);
109 virtual void bindFramebuffer(
110 WebKit::WGC3Denum target, WebKit::WebGLId framebuffer);
111 virtual void bindRenderbuffer(
112 WebKit::WGC3Denum target, WebKit::WebGLId renderbuffer);
113 virtual void bindTexture(
114 WebKit::WGC3Denum target,
115 WebKit::WebGLId texture_id);
116 virtual void blendColor(
117 WebKit::WGC3Dclampf red,
118 WebKit::WGC3Dclampf green,
119 WebKit::WGC3Dclampf blue,
120 WebKit::WGC3Dclampf alpha) {}
121 virtual void blendEquation(WebKit::WGC3Denum mode) {}
122 virtual void blendEquationSeparate(
123 WebKit::WGC3Denum mode_rgb,
124 WebKit::WGC3Denum mode_alpha) {}
125 virtual void blendFunc(
126 WebKit::WGC3Denum sfactor,
127 WebKit::WGC3Denum dfactor) {}
128 virtual void blendFuncSeparate(
129 WebKit::WGC3Denum src_rgb,
130 WebKit::WGC3Denum dst_rgb,
131 WebKit::WGC3Denum src_alpha,
132 WebKit::WGC3Denum dst_alpha) {}
134 virtual void bufferData(
135 WebKit::WGC3Denum target,
136 WebKit::WGC3Dsizeiptr size,
137 const void* data,
138 WebKit::WGC3Denum usage) {}
139 virtual void bufferSubData(
140 WebKit::WGC3Denum target,
141 WebKit::WGC3Dintptr offset,
142 WebKit::WGC3Dsizeiptr size,
143 const void* data) {}
145 virtual WebKit::WGC3Denum checkFramebufferStatus(WebKit::WGC3Denum target);
147 virtual void clear(WebKit::WGC3Dbitfield mask) {}
148 virtual void clearColor(
149 WebKit::WGC3Dclampf red,
150 WebKit::WGC3Dclampf green,
151 WebKit::WGC3Dclampf blue,
152 WebKit::WGC3Dclampf alpha) {}
153 virtual void clearDepth(WebKit::WGC3Dclampf depth) {}
154 virtual void clearStencil(WebKit::WGC3Dint s) {}
155 virtual void colorMask(
156 WebKit::WGC3Dboolean red,
157 WebKit::WGC3Dboolean green,
158 WebKit::WGC3Dboolean blue,
159 WebKit::WGC3Dboolean alpha) {}
160 virtual void compileShader(WebKit::WebGLId shader) {}
162 virtual void compressedTexImage2D(
163 WebKit::WGC3Denum target,
164 WebKit::WGC3Dint level,
165 WebKit::WGC3Denum internal_format,
166 WebKit::WGC3Dsizei width,
167 WebKit::WGC3Dsizei height,
168 WebKit::WGC3Dint border,
169 WebKit::WGC3Dsizei image_size,
170 const void* data) {}
171 virtual void compressedTexSubImage2D(
172 WebKit::WGC3Denum target,
173 WebKit::WGC3Dint level,
174 WebKit::WGC3Dint xoffset,
175 WebKit::WGC3Dint yoffset,
176 WebKit::WGC3Dsizei width,
177 WebKit::WGC3Dsizei height,
178 WebKit::WGC3Denum format,
179 WebKit::WGC3Dsizei image_size,
180 const void* data) {}
181 virtual void copyTexImage2D(
182 WebKit::WGC3Denum target,
183 WebKit::WGC3Dint level,
184 WebKit::WGC3Denum internalformat,
185 WebKit::WGC3Dint x,
186 WebKit::WGC3Dint y,
187 WebKit::WGC3Dsizei width,
188 WebKit::WGC3Dsizei height,
189 WebKit::WGC3Dint border) {}
190 virtual void copyTexSubImage2D(
191 WebKit::WGC3Denum target,
192 WebKit::WGC3Dint level,
193 WebKit::WGC3Dint xoffset,
194 WebKit::WGC3Dint yoffset,
195 WebKit::WGC3Dint x,
196 WebKit::WGC3Dint y,
197 WebKit::WGC3Dsizei width,
198 WebKit::WGC3Dsizei height) {}
199 virtual void cullFace(WebKit::WGC3Denum mode) {}
200 virtual void depthFunc(WebKit::WGC3Denum func) {}
201 virtual void depthMask(WebKit::WGC3Dboolean flag) {}
202 virtual void depthRange(
203 WebKit::WGC3Dclampf z_near,
204 WebKit::WGC3Dclampf z_far) {}
205 virtual void detachShader(WebKit::WebGLId program, WebKit::WebGLId shader) {}
206 virtual void disable(WebKit::WGC3Denum cap) {}
207 virtual void disableVertexAttribArray(WebKit::WGC3Duint index) {}
208 virtual void drawArrays(
209 WebKit::WGC3Denum mode,
210 WebKit::WGC3Dint first,
211 WebKit::WGC3Dsizei count) {}
212 virtual void drawElements(
213 WebKit::WGC3Denum mode,
214 WebKit::WGC3Dsizei count,
215 WebKit::WGC3Denum type,
216 WebKit::WGC3Dintptr offset) {}
218 virtual void enable(WebKit::WGC3Denum cap) {}
219 virtual void enableVertexAttribArray(WebKit::WGC3Duint index) {}
220 virtual void finish() {}
221 virtual void flush() {}
222 virtual void framebufferRenderbuffer(
223 WebKit::WGC3Denum target,
224 WebKit::WGC3Denum attachment,
225 WebKit::WGC3Denum renderbuffertarget,
226 WebKit::WebGLId renderbuffer) {}
227 virtual void framebufferTexture2D(
228 WebKit::WGC3Denum target,
229 WebKit::WGC3Denum attachment,
230 WebKit::WGC3Denum textarget,
231 WebKit::WebGLId texture,
232 WebKit::WGC3Dint level) {}
233 virtual void frontFace(WebKit::WGC3Denum mode) {}
234 virtual void generateMipmap(WebKit::WGC3Denum target) {}
236 virtual bool getActiveAttrib(
237 WebKit::WebGLId program,
238 WebKit::WGC3Duint index, ActiveInfo&);
239 virtual bool getActiveUniform(
240 WebKit::WebGLId program,
241 WebKit::WGC3Duint index,
242 ActiveInfo&);
243 virtual void getAttachedShaders(
244 WebKit::WebGLId program,
245 WebKit::WGC3Dsizei max_count,
246 WebKit::WGC3Dsizei* count,
247 WebKit::WebGLId* shaders) {}
248 virtual WebKit::WGC3Dint getAttribLocation(
249 WebKit::WebGLId program,
250 const WebKit::WGC3Dchar* name);
251 virtual void getBooleanv(
252 WebKit::WGC3Denum pname,
253 WebKit::WGC3Dboolean* value) {}
254 virtual void getBufferParameteriv(
255 WebKit::WGC3Denum target,
256 WebKit::WGC3Denum pname,
257 WebKit::WGC3Dint* value) {}
258 virtual Attributes getContextAttributes();
259 virtual WebKit::WGC3Denum getError();
260 virtual void getFloatv(
261 WebKit::WGC3Denum pname,
262 WebKit::WGC3Dfloat* value) {}
263 virtual void getFramebufferAttachmentParameteriv(
264 WebKit::WGC3Denum target,
265 WebKit::WGC3Denum attachment,
266 WebKit::WGC3Denum pname,
267 WebKit::WGC3Dint* value) {}
269 virtual void getIntegerv(
270 WebKit::WGC3Denum pname,
271 WebKit::WGC3Dint* value);
273 virtual void getProgramiv(
274 WebKit::WebGLId program,
275 WebKit::WGC3Denum pname,
276 WebKit::WGC3Dint* value);
278 virtual WebKit::WebString getProgramInfoLog(WebKit::WebGLId program);
279 virtual void getRenderbufferParameteriv(
280 WebKit::WGC3Denum target,
281 WebKit::WGC3Denum pname,
282 WebKit::WGC3Dint* value) {}
284 virtual void getShaderiv(
285 WebKit::WebGLId shader,
286 WebKit::WGC3Denum pname,
287 WebKit::WGC3Dint* value);
289 virtual WebKit::WebString getShaderInfoLog(WebKit::WebGLId shader);
290 virtual void getShaderPrecisionFormat(
291 WebKit::WGC3Denum shadertype,
292 WebKit::WGC3Denum precisiontype,
293 WebKit::WGC3Dint* range,
294 WebKit::WGC3Dint* precision);
295 virtual WebKit::WebString getShaderSource(WebKit::WebGLId shader);
296 virtual WebKit::WebString getString(WebKit::WGC3Denum name);
297 virtual void getTexParameterfv(
298 WebKit::WGC3Denum target,
299 WebKit::WGC3Denum pname,
300 WebKit::WGC3Dfloat* value) {}
301 virtual void getTexParameteriv(
302 WebKit::WGC3Denum target,
303 WebKit::WGC3Denum pname,
304 WebKit::WGC3Dint* value) {}
305 virtual void getUniformfv(
306 WebKit::WebGLId program,
307 WebKit::WGC3Dint location,
308 WebKit::WGC3Dfloat* value) {}
309 virtual void getUniformiv(
310 WebKit::WebGLId program,
311 WebKit::WGC3Dint location,
312 WebKit::WGC3Dint* value) {}
313 virtual WebKit::WGC3Dint getUniformLocation(
314 WebKit::WebGLId program,
315 const WebKit::WGC3Dchar* name);
316 virtual void getVertexAttribfv(
317 WebKit::WGC3Duint index,
318 WebKit::WGC3Denum pname,
319 WebKit::WGC3Dfloat* value) {}
320 virtual void getVertexAttribiv(
321 WebKit::WGC3Duint index,
322 WebKit::WGC3Denum pname,
323 WebKit::WGC3Dint* value) {}
324 virtual WebKit::WGC3Dsizeiptr getVertexAttribOffset(
325 WebKit::WGC3Duint index,
326 WebKit::WGC3Denum pname);
328 virtual void hint(WebKit::WGC3Denum target, WebKit::WGC3Denum mode) {}
329 virtual WebKit::WGC3Dboolean isBuffer(WebKit::WebGLId buffer);
330 virtual WebKit::WGC3Dboolean isEnabled(WebKit::WGC3Denum cap);
331 virtual WebKit::WGC3Dboolean isFramebuffer(WebKit::WebGLId framebuffer);
332 virtual WebKit::WGC3Dboolean isProgram(WebKit::WebGLId program);
333 virtual WebKit::WGC3Dboolean isRenderbuffer(WebKit::WebGLId renderbuffer);
334 virtual WebKit::WGC3Dboolean isShader(WebKit::WebGLId shader);
335 virtual WebKit::WGC3Dboolean isTexture(WebKit::WebGLId texture);
336 virtual void lineWidth(WebKit::WGC3Dfloat) {}
337 virtual void linkProgram(WebKit::WebGLId program) {}
338 virtual void pixelStorei(WebKit::WGC3Denum pname, WebKit::WGC3Dint param) {}
339 virtual void polygonOffset(
340 WebKit::WGC3Dfloat factor,
341 WebKit::WGC3Dfloat units) {}
343 virtual void readPixels(
344 WebKit::WGC3Dint x,
345 WebKit::WGC3Dint y,
346 WebKit::WGC3Dsizei width,
347 WebKit::WGC3Dsizei height,
348 WebKit::WGC3Denum format,
349 WebKit::WGC3Denum type,
350 void* pixels) {}
352 virtual void releaseShaderCompiler() {}
354 virtual void renderbufferStorage(
355 WebKit::WGC3Denum target,
356 WebKit::WGC3Denum internalformat,
357 WebKit::WGC3Dsizei width,
358 WebKit::WGC3Dsizei height) {}
359 virtual void sampleCoverage(
360 WebKit::WGC3Dclampf value,
361 WebKit::WGC3Dboolean invert) {}
362 virtual void scissor(
363 WebKit::WGC3Dint x,
364 WebKit::WGC3Dint y,
365 WebKit::WGC3Dsizei width,
366 WebKit::WGC3Dsizei height) {}
367 virtual void shaderSource(
368 WebKit::WebGLId shader,
369 const WebKit::WGC3Dchar* string) {}
370 virtual void stencilFunc(
371 WebKit::WGC3Denum func,
372 WebKit::WGC3Dint ref,
373 WebKit::WGC3Duint mask) {}
374 virtual void stencilFuncSeparate(
375 WebKit::WGC3Denum face,
376 WebKit::WGC3Denum func,
377 WebKit::WGC3Dint ref,
378 WebKit::WGC3Duint mask) {}
379 virtual void stencilMask(WebKit::WGC3Duint mask) {}
380 virtual void stencilMaskSeparate(
381 WebKit::WGC3Denum face,
382 WebKit::WGC3Duint mask) {}
383 virtual void stencilOp(
384 WebKit::WGC3Denum fail,
385 WebKit::WGC3Denum zfail,
386 WebKit::WGC3Denum zpass) {}
387 virtual void stencilOpSeparate(
388 WebKit::WGC3Denum face,
389 WebKit::WGC3Denum fail,
390 WebKit::WGC3Denum zfail,
391 WebKit::WGC3Denum zpass) {}
393 virtual void texImage2D(
394 WebKit::WGC3Denum target,
395 WebKit::WGC3Dint level,
396 WebKit::WGC3Denum internalformat,
397 WebKit::WGC3Dsizei width,
398 WebKit::WGC3Dsizei height,
399 WebKit::WGC3Dint border,
400 WebKit::WGC3Denum format,
401 WebKit::WGC3Denum type,
402 const void* pixels) {}
404 virtual void texParameterf(
405 WebKit::WGC3Denum target,
406 WebKit::WGC3Denum pname,
407 WebKit::WGC3Dfloat param) {}
408 virtual void texParameteri(
409 WebKit::WGC3Denum target,
410 WebKit::WGC3Denum pname,
411 WebKit::WGC3Dint param) {}
413 virtual void texSubImage2D(
414 WebKit::WGC3Denum target,
415 WebKit::WGC3Dint level,
416 WebKit::WGC3Dint xoffset,
417 WebKit::WGC3Dint yoffset,
418 WebKit::WGC3Dsizei width,
419 WebKit::WGC3Dsizei height,
420 WebKit::WGC3Denum format,
421 WebKit::WGC3Denum type,
422 const void* pixels) {}
424 virtual void uniform1f(WebKit::WGC3Dint location, WebKit::WGC3Dfloat x) {}
425 virtual void uniform1fv(
426 WebKit::WGC3Dint location,
427 WebKit::WGC3Dsizei count,
428 const WebKit::WGC3Dfloat* v) {}
429 virtual void uniform1i(WebKit::WGC3Dint location, WebKit::WGC3Dint x) {}
430 virtual void uniform1iv(
431 WebKit::WGC3Dint location,
432 WebKit::WGC3Dsizei count,
433 const WebKit::WGC3Dint* v) {}
434 virtual void uniform2f(
435 WebKit::WGC3Dint location,
436 WebKit::WGC3Dfloat x,
437 WebKit::WGC3Dfloat y) {}
438 virtual void uniform2fv(
439 WebKit::WGC3Dint location,
440 WebKit::WGC3Dsizei count,
441 const WebKit::WGC3Dfloat* v) {}
442 virtual void uniform2i(
443 WebKit::WGC3Dint location,
444 WebKit::WGC3Dint x,
445 WebKit::WGC3Dint y) {}
446 virtual void uniform2iv(
447 WebKit::WGC3Dint location,
448 WebKit::WGC3Dsizei count,
449 const WebKit::WGC3Dint* v) {}
450 virtual void uniform3f(
451 WebKit::WGC3Dint location,
452 WebKit::WGC3Dfloat x,
453 WebKit::WGC3Dfloat y,
454 WebKit::WGC3Dfloat z) {}
455 virtual void uniform3fv(
456 WebKit::WGC3Dint location,
457 WebKit::WGC3Dsizei count,
458 const WebKit::WGC3Dfloat* v) {}
459 virtual void uniform3i(
460 WebKit::WGC3Dint location,
461 WebKit::WGC3Dint x,
462 WebKit::WGC3Dint y,
463 WebKit::WGC3Dint z) {}
464 virtual void uniform3iv(
465 WebKit::WGC3Dint location,
466 WebKit::WGC3Dsizei count,
467 const WebKit::WGC3Dint* v) {}
468 virtual void uniform4f(
469 WebKit::WGC3Dint location,
470 WebKit::WGC3Dfloat x,
471 WebKit::WGC3Dfloat y,
472 WebKit::WGC3Dfloat z,
473 WebKit::WGC3Dfloat w) {}
474 virtual void uniform4fv(
475 WebKit::WGC3Dint location,
476 WebKit::WGC3Dsizei count,
477 const WebKit::WGC3Dfloat* v) {}
478 virtual void uniform4i(
479 WebKit::WGC3Dint location,
480 WebKit::WGC3Dint x,
481 WebKit::WGC3Dint y,
482 WebKit::WGC3Dint z,
483 WebKit::WGC3Dint w) {}
484 virtual void uniform4iv(
485 WebKit::WGC3Dint location,
486 WebKit::WGC3Dsizei count,
487 const WebKit::WGC3Dint* v) {}
488 virtual void uniformMatrix2fv(
489 WebKit::WGC3Dint location,
490 WebKit::WGC3Dsizei count,
491 WebKit::WGC3Dboolean transpose,
492 const WebKit::WGC3Dfloat* value) {}
493 virtual void uniformMatrix3fv(
494 WebKit::WGC3Dint location,
495 WebKit::WGC3Dsizei count,
496 WebKit::WGC3Dboolean transpose,
497 const WebKit::WGC3Dfloat* value) {}
498 virtual void uniformMatrix4fv(
499 WebKit::WGC3Dint location,
500 WebKit::WGC3Dsizei count,
501 WebKit::WGC3Dboolean transpose,
502 const WebKit::WGC3Dfloat* value) {}
504 virtual void useProgram(WebKit::WebGLId program);
505 virtual void validateProgram(WebKit::WebGLId program) {}
507 virtual void vertexAttrib1f(WebKit::WGC3Duint index, WebKit::WGC3Dfloat x) {}
508 virtual void vertexAttrib1fv(
509 WebKit::WGC3Duint index,
510 const WebKit::WGC3Dfloat* values) {}
511 virtual void vertexAttrib2f(
512 WebKit::WGC3Duint index,
513 WebKit::WGC3Dfloat x,
514 WebKit::WGC3Dfloat y) {}
515 virtual void vertexAttrib2fv(
516 WebKit::WGC3Duint index,
517 const WebKit::WGC3Dfloat* values) {}
518 virtual void vertexAttrib3f(
519 WebKit::WGC3Duint index,
520 WebKit::WGC3Dfloat x,
521 WebKit::WGC3Dfloat y,
522 WebKit::WGC3Dfloat z) {}
523 virtual void vertexAttrib3fv(
524 WebKit::WGC3Duint index,
525 const WebKit::WGC3Dfloat* values) {}
526 virtual void vertexAttrib4f(
527 WebKit::WGC3Duint index,
528 WebKit::WGC3Dfloat x,
529 WebKit::WGC3Dfloat y,
530 WebKit::WGC3Dfloat z,
531 WebKit::WGC3Dfloat w) {}
532 virtual void vertexAttrib4fv(
533 WebKit::WGC3Duint index,
534 const WebKit::WGC3Dfloat* values) {}
535 virtual void vertexAttribPointer(
536 WebKit::WGC3Duint index,
537 WebKit::WGC3Dint size,
538 WebKit::WGC3Denum type,
539 WebKit::WGC3Dboolean normalized,
540 WebKit::WGC3Dsizei stride,
541 WebKit::WGC3Dintptr offset) {}
543 virtual void viewport(
544 WebKit::WGC3Dint x,
545 WebKit::WGC3Dint y,
546 WebKit::WGC3Dsizei width,
547 WebKit::WGC3Dsizei height) {}
549 virtual WebKit::WebGLId createBuffer();
550 virtual WebKit::WebGLId createFramebuffer();
551 virtual WebKit::WebGLId createProgram();
552 virtual WebKit::WebGLId createRenderbuffer();
553 virtual WebKit::WebGLId createShader(WebKit::WGC3Denum);
554 virtual WebKit::WebGLId createTexture();
556 virtual void deleteBuffer(WebKit::WebGLId id);
557 virtual void deleteFramebuffer(WebKit::WebGLId id);
558 virtual void deleteProgram(WebKit::WebGLId id);
559 virtual void deleteRenderbuffer(WebKit::WebGLId id);
560 virtual void deleteShader(WebKit::WebGLId id);
561 virtual void deleteTexture(WebKit::WebGLId texture_id);
563 virtual void texStorage2DEXT(
564 WebKit::WGC3Denum target,
565 WebKit::WGC3Dint levels,
566 WebKit::WGC3Duint internalformat,
567 WebKit::WGC3Dint width,
568 WebKit::WGC3Dint height) {}
570 virtual WebKit::WebGLId createQueryEXT();
571 virtual void deleteQueryEXT(WebKit::WebGLId query) {}
572 virtual WebKit::WGC3Dboolean isQueryEXT(WebKit::WebGLId query);
573 virtual void beginQueryEXT(
574 WebKit::WGC3Denum target,
575 WebKit::WebGLId query) {}
576 virtual void endQueryEXT(WebKit::WGC3Denum target);
577 virtual void getQueryivEXT(
578 WebKit::WGC3Denum target,
579 WebKit::WGC3Denum pname,
580 WebKit::WGC3Dint* params) {}
581 virtual void getQueryObjectuivEXT(
582 WebKit::WebGLId query,
583 WebKit::WGC3Denum pname,
584 WebKit::WGC3Duint* params);
586 virtual void setContextLostCallback(
587 WebGraphicsContextLostCallback* callback);
589 virtual void loseContextCHROMIUM(WebKit::WGC3Denum current,
590 WebKit::WGC3Denum other);
592 virtual void drawBuffersEXT(WebKit::WGC3Dsizei m,
593 const WebKit::WGC3Denum* bufs) {}
595 virtual void bindTexImage2DCHROMIUM(WebKit::WGC3Denum target,
596 WebKit::WGC3Dint image_id) {}
598 // GL_CHROMIUM_gpu_memory_buffer
599 virtual WebKit::WGC3Duint createImageCHROMIUM(
600 WebKit::WGC3Dsizei width,
601 WebKit::WGC3Dsizei height,
602 WebKit::WGC3Denum internalformat);
603 virtual void destroyImageCHROMIUM(WebKit::WGC3Duint image_id) {}
604 virtual void getImageParameterivCHROMIUM(
605 WebKit::WGC3Duint image_id,
606 WebKit::WGC3Denum pname,
607 WebKit::WGC3Dint* params) {}
608 virtual void* mapImageCHROMIUM(
609 WebKit::WGC3Duint image_id,
610 WebKit::WGC3Denum access);
611 virtual void unmapImageCHROMIUM(WebKit::WGC3Duint image_id) {}
613 private:
614 DISALLOW_COPY_AND_ASSIGN(FakeWebGraphicsContext3D);
617 } // namespace cc
619 #endif // CC_DEBUG_FAKE_WEB_GRAPHICS_CONTEXT_3D_H_