summaryrefslogtreecommitdiffstats
path: root/cc/debug/fake_web_graphics_context_3d.h
blob: 3c8a6f53b760b5434628884e2acae0a7cb6756ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CC_DEBUG_FAKE_WEB_GRAPHICS_CONTEXT_3D_H_
#define CC_DEBUG_FAKE_WEB_GRAPHICS_CONTEXT_3D_H_

#include <string>

#include "base/compiler_specific.h"
#include "cc/base/cc_export.h"
#include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"

namespace cc {

// WebGraphicsContext3D base class for use in unit tests.
// All operations are no-ops (returning 0 if necessary).
class CC_EXPORT FakeWebGraphicsContext3D
    : public NON_EXPORTED_BASE(WebKit::WebGraphicsContext3D) {
 public:
  FakeWebGraphicsContext3D();
  virtual ~FakeWebGraphicsContext3D();

  virtual bool makeContextCurrent();

  virtual int width();
  virtual int height();

  virtual void reshape(int width, int height);

  virtual bool isGLES2Compliant();

  virtual WebKit::WebGLId getPlatformTextureId();

  virtual void prepareTexture() {}

  virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) {}

  virtual void synthesizeGLError(WebKit::WGC3Denum) {}

  virtual bool isContextLost();
  virtual WebKit::WGC3Denum getGraphicsResetStatusARB();

  virtual void* mapBufferSubDataCHROMIUM(
      WebKit::WGC3Denum target,
      WebKit::WGC3Dintptr offset,
      WebKit::WGC3Dsizeiptr size,
      WebKit::WGC3Denum access);

  virtual void unmapBufferSubDataCHROMIUM(const void*) {}
  virtual void* mapTexSubImage2DCHROMIUM(
      WebKit::WGC3Denum target,
      WebKit::WGC3Dint level,
      WebKit::WGC3Dint xoffset,
      WebKit::WGC3Dint yoffset,
      WebKit::WGC3Dsizei width,
      WebKit::WGC3Dsizei height,
      WebKit::WGC3Denum format,
      WebKit::WGC3Denum type,
      WebKit::WGC3Denum access);
  virtual void unmapTexSubImage2DCHROMIUM(const void*) {}

  virtual void setVisibilityCHROMIUM(bool visible) {}

  virtual void discardFramebufferEXT(
      WebKit::WGC3Denum target,
      WebKit::WGC3Dsizei num_attachments,
      const WebKit::WGC3Denum* attachments) {}

  virtual void setMemoryAllocationChangedCallbackCHROMIUM(
      WebGraphicsMemoryAllocationChangedCallbackCHROMIUM* callback) {}

  virtual WebKit::WebString getRequestableExtensionsCHROMIUM();
  virtual void requestExtensionCHROMIUM(const char*) {}

  virtual void blitFramebufferCHROMIUM(
      WebKit::WGC3Dint src_x0,
      WebKit::WGC3Dint src_y0,
      WebKit::WGC3Dint src_x1,
      WebKit::WGC3Dint src_y1,
      WebKit::WGC3Dint dst_x0,
      WebKit::WGC3Dint dst_y0,
      WebKit::WGC3Dint dst_x1,
      WebKit::WGC3Dint dst_y1,
      WebKit::WGC3Dbitfield mask,
      WebKit::WGC3Denum filter) {}
  virtual void renderbufferStorageMultisampleCHROMIUM(
      WebKit::WGC3Denum target,
      WebKit::WGC3Dsizei samples,
      WebKit::WGC3Denum internalformat,
      WebKit::WGC3Dsizei width,
      WebKit::WGC3Dsizei height) {}

  virtual void activeTexture(WebKit::WGC3Denum texture) {}
  virtual void attachShader(WebKit::WebGLId program, WebKit::WebGLId shader);
  virtual void bindAttribLocation(
      WebKit::WebGLId program,
      WebKit::WGC3Duint index,
      const WebKit::WGC3Dchar* name) {}
  virtual void bindBuffer(WebKit::WGC3Denum target, WebKit::WebGLId buffer);
  virtual void bindFramebuffer(
      WebKit::WGC3Denum target, WebKit::WebGLId framebuffer);
  virtual void bindRenderbuffer(
      WebKit::WGC3Denum target, WebKit::WebGLId renderbuffer);
  virtual void bindTexture(
      WebKit::WGC3Denum target,
      WebKit::WebGLId texture_id);
  virtual void blendColor(
      WebKit::WGC3Dclampf red,
      WebKit::WGC3Dclampf green,
      WebKit::WGC3Dclampf blue,
      WebKit::WGC3Dclampf alpha) {}
  virtual void blendEquation(WebKit::WGC3Denum mode) {}
  virtual void blendEquationSeparate(
      WebKit::WGC3Denum mode_rgb,
      WebKit::WGC3Denum mode_alpha) {}
  virtual void blendFunc(
      WebKit::WGC3Denum sfactor,
      WebKit::WGC3Denum dfactor) {}
  virtual void blendFuncSeparate(
      WebKit::WGC3Denum src_rgb,
      WebKit::WGC3Denum dst_rgb,
      WebKit::WGC3Denum src_alpha,
      WebKit::WGC3Denum dst_alpha) {}

  virtual void bufferData(
      WebKit::WGC3Denum target,
      WebKit::WGC3Dsizeiptr size,
      const void* data,
      WebKit::WGC3Denum usage) {}
  virtual void bufferSubData(
      WebKit::WGC3Denum target,
      WebKit::WGC3Dintptr offset,
      WebKit::WGC3Dsizeiptr size,
      const void* data) {}

  virtual WebKit::WGC3Denum checkFramebufferStatus(WebKit::WGC3Denum target);

  virtual void clear(WebKit::WGC3Dbitfield mask) {}
  virtual void clearColor(
      WebKit::WGC3Dclampf red,
      WebKit::WGC3Dclampf green,
      WebKit::WGC3Dclampf blue,
      WebKit::WGC3Dclampf alpha) {}
  virtual void clearDepth(WebKit::WGC3Dclampf depth) {}
  virtual void clearStencil(WebKit::WGC3Dint s) {}
  virtual void colorMask(
      WebKit::WGC3Dboolean red,
      WebKit::WGC3Dboolean green,
      WebKit::WGC3Dboolean blue,
      WebKit::WGC3Dboolean alpha) {}
  virtual void compileShader(WebKit::WebGLId shader) {}

  virtual void compressedTexImage2D(
      WebKit::WGC3Denum target,
      WebKit::WGC3Dint level,
      WebKit::WGC3Denum internal_format,
      WebKit::WGC3Dsizei width,
      WebKit::WGC3Dsizei height,
      WebKit::WGC3Dint border,
      WebKit::WGC3Dsizei image_size,
      const void* data) {}
  virtual void compressedTexSubImage2D(
      WebKit::WGC3Denum target,
      WebKit::WGC3Dint level,
      WebKit::WGC3Dint xoffset,
      WebKit::WGC3Dint yoffset,
      WebKit::WGC3Dsizei width,
      WebKit::WGC3Dsizei height,
      WebKit::WGC3Denum format,
      WebKit::WGC3Dsizei image_size,
      const void* data) {}
  virtual void copyTexImage2D(
      WebKit::WGC3Denum target,
      WebKit::WGC3Dint level,
      WebKit::WGC3Denum internalformat,
      WebKit::WGC3Dint x,
      WebKit::WGC3Dint y,
      WebKit::WGC3Dsizei width,
      WebKit::WGC3Dsizei height,
      WebKit::WGC3Dint border) {}
  virtual void copyTexSubImage2D(
      WebKit::WGC3Denum target,
      WebKit::WGC3Dint level,
      WebKit::WGC3Dint xoffset,
      WebKit::WGC3Dint yoffset,
      WebKit::WGC3Dint x,
      WebKit::WGC3Dint y,
      WebKit::WGC3Dsizei width,
      WebKit::WGC3Dsizei height) {}
  virtual void cullFace(WebKit::WGC3Denum mode) {}
  virtual void depthFunc(WebKit::WGC3Denum func) {}
  virtual void depthMask(WebKit::WGC3Dboolean flag) {}
  virtual void depthRange(
      WebKit::WGC3Dclampf z_near,
      WebKit::WGC3Dclampf z_far) {}
  virtual void detachShader(WebKit::WebGLId program, WebKit::WebGLId shader) {}
  virtual void disable(WebKit::WGC3Denum cap) {}
  virtual void disableVertexAttribArray(WebKit::WGC3Duint index) {}
  virtual void drawArrays(
      WebKit::WGC3Denum mode,
      WebKit::WGC3Dint first,
      WebKit::WGC3Dsizei count) {}
  virtual void drawElements(
      WebKit::WGC3Denum mode,
      WebKit::WGC3Dsizei count,
      WebKit::WGC3Denum type,
      WebKit::WGC3Dintptr offset) {}

  virtual void enable(WebKit::WGC3Denum cap) {}
  virtual void enableVertexAttribArray(WebKit::WGC3Duint index) {}
  virtual void finish() {}
  virtual void flush() {}
  virtual void framebufferRenderbuffer(
      WebKit::WGC3Denum target,
      WebKit::WGC3Denum attachment,
      WebKit::WGC3Denum renderbuffertarget,
      WebKit::WebGLId renderbuffer) {}
  virtual void framebufferTexture2D(
      WebKit::WGC3Denum target,
      WebKit::WGC3Denum attachment,
      WebKit::WGC3Denum textarget,
      WebKit::WebGLId texture,
      WebKit::WGC3Dint level) {}
  virtual void frontFace(WebKit::WGC3Denum mode) {}
  virtual void generateMipmap(WebKit::WGC3Denum target) {}

  virtual bool getActiveAttrib(
      WebKit::WebGLId program,
      WebKit::WGC3Duint index, ActiveInfo&);
  virtual bool getActiveUniform(
      WebKit::WebGLId program,
      WebKit::WGC3Duint index,
      ActiveInfo&);
  virtual void getAttachedShaders(
      WebKit::WebGLId program,
      WebKit::WGC3Dsizei max_count,
      WebKit::WGC3Dsizei* count,
      WebKit::WebGLId* shaders) {}
  virtual WebKit::WGC3Dint getAttribLocation(
      WebKit::WebGLId program,
      const WebKit::WGC3Dchar* name);
  virtual void getBooleanv(
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dboolean* value) {}
  virtual void getBufferParameteriv(
      WebKit::WGC3Denum target,
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dint* value) {}
  virtual Attributes getContextAttributes();
  virtual WebKit::WGC3Denum getError();
  virtual void getFloatv(
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dfloat* value) {}
  virtual void getFramebufferAttachmentParameteriv(
      WebKit::WGC3Denum target,
      WebKit::WGC3Denum attachment,
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dint* value) {}

  virtual void getIntegerv(
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dint* value);

  virtual void getProgramiv(
      WebKit::WebGLId program,
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dint* value);

  virtual WebKit::WebString getProgramInfoLog(WebKit::WebGLId program);
  virtual void getRenderbufferParameteriv(
      WebKit::WGC3Denum target,
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dint* value) {}

  virtual void getShaderiv(
      WebKit::WebGLId shader,
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dint* value);

  virtual WebKit::WebString getShaderInfoLog(WebKit::WebGLId shader);
  virtual void getShaderPrecisionFormat(
      WebKit::WGC3Denum shadertype,
      WebKit::WGC3Denum precisiontype,
      WebKit::WGC3Dint* range,
      WebKit::WGC3Dint* precision);
  virtual WebKit::WebString getShaderSource(WebKit::WebGLId shader);
  virtual WebKit::WebString getString(WebKit::WGC3Denum name);
  virtual void getTexParameterfv(
      WebKit::WGC3Denum target,
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dfloat* value) {}
  virtual void getTexParameteriv(
      WebKit::WGC3Denum target,
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dint* value) {}
  virtual void getUniformfv(
      WebKit::WebGLId program,
      WebKit::WGC3Dint location,
      WebKit::WGC3Dfloat* value) {}
  virtual void getUniformiv(
      WebKit::WebGLId program,
      WebKit::WGC3Dint location,
      WebKit::WGC3Dint* value) {}
  virtual WebKit::WGC3Dint getUniformLocation(
      WebKit::WebGLId program,
      const WebKit::WGC3Dchar* name);
  virtual void getVertexAttribfv(
      WebKit::WGC3Duint index,
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dfloat* value) {}
  virtual void getVertexAttribiv(
      WebKit::WGC3Duint index,
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dint* value) {}
  virtual WebKit::WGC3Dsizeiptr getVertexAttribOffset(
      WebKit::WGC3Duint index,
      WebKit::WGC3Denum pname);

  virtual void hint(WebKit::WGC3Denum target, WebKit::WGC3Denum mode) {}
  virtual WebKit::WGC3Dboolean isBuffer(WebKit::WebGLId buffer);
  virtual WebKit::WGC3Dboolean isEnabled(WebKit::WGC3Denum cap);
  virtual WebKit::WGC3Dboolean isFramebuffer(WebKit::WebGLId framebuffer);
  virtual WebKit::WGC3Dboolean isProgram(WebKit::WebGLId program);
  virtual WebKit::WGC3Dboolean isRenderbuffer(WebKit::WebGLId renderbuffer);
  virtual WebKit::WGC3Dboolean isShader(WebKit::WebGLId shader);
  virtual WebKit::WGC3Dboolean isTexture(WebKit::WebGLId texture);
  virtual void lineWidth(WebKit::WGC3Dfloat) {}
  virtual void linkProgram(WebKit::WebGLId program) {}
  virtual void pixelStorei(WebKit::WGC3Denum pname, WebKit::WGC3Dint param) {}
  virtual void polygonOffset(
      WebKit::WGC3Dfloat factor,
      WebKit::WGC3Dfloat units) {}

  virtual void readPixels(
      WebKit::WGC3Dint x,
      WebKit::WGC3Dint y,
      WebKit::WGC3Dsizei width,
      WebKit::WGC3Dsizei height,
      WebKit::WGC3Denum format,
      WebKit::WGC3Denum type,
      void* pixels) {}

  virtual void releaseShaderCompiler() {}

  virtual void renderbufferStorage(
      WebKit::WGC3Denum target,
      WebKit::WGC3Denum internalformat,
      WebKit::WGC3Dsizei width,
      WebKit::WGC3Dsizei height) {}
  virtual void sampleCoverage(
      WebKit::WGC3Dclampf value,
      WebKit::WGC3Dboolean invert) {}
  virtual void scissor(
      WebKit::WGC3Dint x,
      WebKit::WGC3Dint y,
      WebKit::WGC3Dsizei width,
      WebKit::WGC3Dsizei height) {}
  virtual void shaderSource(
      WebKit::WebGLId shader,
      const WebKit::WGC3Dchar* string) {}
  virtual void stencilFunc(
      WebKit::WGC3Denum func,
      WebKit::WGC3Dint ref,
      WebKit::WGC3Duint mask) {}
  virtual void stencilFuncSeparate(
      WebKit::WGC3Denum face,
      WebKit::WGC3Denum func,
      WebKit::WGC3Dint ref,
      WebKit::WGC3Duint mask) {}
  virtual void stencilMask(WebKit::WGC3Duint mask) {}
  virtual void stencilMaskSeparate(
      WebKit::WGC3Denum face,
      WebKit::WGC3Duint mask) {}
  virtual void stencilOp(
      WebKit::WGC3Denum fail,
      WebKit::WGC3Denum zfail,
      WebKit::WGC3Denum zpass) {}
  virtual void stencilOpSeparate(
      WebKit::WGC3Denum face,
      WebKit::WGC3Denum fail,
      WebKit::WGC3Denum zfail,
      WebKit::WGC3Denum zpass) {}

  virtual void texImage2D(
      WebKit::WGC3Denum target,
      WebKit::WGC3Dint level,
      WebKit::WGC3Denum internalformat,
      WebKit::WGC3Dsizei width,
      WebKit::WGC3Dsizei height,
      WebKit::WGC3Dint border,
      WebKit::WGC3Denum format,
      WebKit::WGC3Denum type,
      const void* pixels) {}

  virtual void texParameterf(
      WebKit::WGC3Denum target,
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dfloat param) {}
  virtual void texParameteri(
      WebKit::WGC3Denum target,
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dint param) {}

  virtual void texSubImage2D(
      WebKit::WGC3Denum target,
      WebKit::WGC3Dint level,
      WebKit::WGC3Dint xoffset,
      WebKit::WGC3Dint yoffset,
      WebKit::WGC3Dsizei width,
      WebKit::WGC3Dsizei height,
      WebKit::WGC3Denum format,
      WebKit::WGC3Denum type,
      const void* pixels) {}

  virtual void uniform1f(WebKit::WGC3Dint location, WebKit::WGC3Dfloat x) {}
  virtual void uniform1fv(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dsizei count,
      const WebKit::WGC3Dfloat* v) {}
  virtual void uniform1i(WebKit::WGC3Dint location, WebKit::WGC3Dint x) {}
  virtual void uniform1iv(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dsizei count,
      const WebKit::WGC3Dint* v) {}
  virtual void uniform2f(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dfloat x,
      WebKit::WGC3Dfloat y) {}
  virtual void uniform2fv(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dsizei count,
      const WebKit::WGC3Dfloat* v) {}
  virtual void uniform2i(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dint x,
      WebKit::WGC3Dint y) {}
  virtual void uniform2iv(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dsizei count,
      const WebKit::WGC3Dint* v) {}
  virtual void uniform3f(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dfloat x,
      WebKit::WGC3Dfloat y,
      WebKit::WGC3Dfloat z) {}
  virtual void uniform3fv(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dsizei count,
      const WebKit::WGC3Dfloat* v) {}
  virtual void uniform3i(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dint x,
      WebKit::WGC3Dint y,
      WebKit::WGC3Dint z) {}
  virtual void uniform3iv(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dsizei count,
      const WebKit::WGC3Dint* v) {}
  virtual void uniform4f(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dfloat x,
      WebKit::WGC3Dfloat y,
      WebKit::WGC3Dfloat z,
      WebKit::WGC3Dfloat w) {}
  virtual void uniform4fv(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dsizei count,
      const WebKit::WGC3Dfloat* v) {}
  virtual void uniform4i(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dint x,
      WebKit::WGC3Dint y,
      WebKit::WGC3Dint z,
      WebKit::WGC3Dint w) {}
  virtual void uniform4iv(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dsizei count,
      const WebKit::WGC3Dint* v) {}
  virtual void uniformMatrix2fv(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dsizei count,
      WebKit::WGC3Dboolean transpose,
      const WebKit::WGC3Dfloat* value) {}
  virtual void uniformMatrix3fv(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dsizei count,
      WebKit::WGC3Dboolean transpose,
      const WebKit::WGC3Dfloat* value) {}
  virtual void uniformMatrix4fv(
      WebKit::WGC3Dint location,
      WebKit::WGC3Dsizei count,
      WebKit::WGC3Dboolean transpose,
      const WebKit::WGC3Dfloat* value) {}

  virtual void useProgram(WebKit::WebGLId program);
  virtual void validateProgram(WebKit::WebGLId program) {}

  virtual void vertexAttrib1f(WebKit::WGC3Duint index, WebKit::WGC3Dfloat x) {}
  virtual void vertexAttrib1fv(
      WebKit::WGC3Duint index,
      const WebKit::WGC3Dfloat* values) {}
  virtual void vertexAttrib2f(
      WebKit::WGC3Duint index,
      WebKit::WGC3Dfloat x,
      WebKit::WGC3Dfloat y) {}
  virtual void vertexAttrib2fv(
      WebKit::WGC3Duint index,
      const WebKit::WGC3Dfloat* values) {}
  virtual void vertexAttrib3f(
      WebKit::WGC3Duint index,
      WebKit::WGC3Dfloat x,
      WebKit::WGC3Dfloat y,
      WebKit::WGC3Dfloat z) {}
  virtual void vertexAttrib3fv(
      WebKit::WGC3Duint index,
      const WebKit::WGC3Dfloat* values) {}
  virtual void vertexAttrib4f(
      WebKit::WGC3Duint index,
      WebKit::WGC3Dfloat x,
      WebKit::WGC3Dfloat y,
      WebKit::WGC3Dfloat z,
      WebKit::WGC3Dfloat w) {}
  virtual void vertexAttrib4fv(
      WebKit::WGC3Duint index,
      const WebKit::WGC3Dfloat* values) {}
  virtual void vertexAttribPointer(
      WebKit::WGC3Duint index,
      WebKit::WGC3Dint size,
      WebKit::WGC3Denum type,
      WebKit::WGC3Dboolean normalized,
      WebKit::WGC3Dsizei stride,
      WebKit::WGC3Dintptr offset) {}

  virtual void viewport(
      WebKit::WGC3Dint x,
      WebKit::WGC3Dint y,
      WebKit::WGC3Dsizei width,
      WebKit::WGC3Dsizei height) {}

  virtual WebKit::WebGLId createBuffer();
  virtual WebKit::WebGLId createFramebuffer();
  virtual WebKit::WebGLId createProgram();
  virtual WebKit::WebGLId createRenderbuffer();
  virtual WebKit::WebGLId createShader(WebKit::WGC3Denum);
  virtual WebKit::WebGLId createTexture();

  virtual void deleteBuffer(WebKit::WebGLId id);
  virtual void deleteFramebuffer(WebKit::WebGLId id);
  virtual void deleteProgram(WebKit::WebGLId id);
  virtual void deleteRenderbuffer(WebKit::WebGLId id);
  virtual void deleteShader(WebKit::WebGLId id);
  virtual void deleteTexture(WebKit::WebGLId texture_id);

  virtual void texStorage2DEXT(
      WebKit::WGC3Denum target,
      WebKit::WGC3Dint levels,
      WebKit::WGC3Duint internalformat,
      WebKit::WGC3Dint width,
      WebKit::WGC3Dint height) {}

  virtual WebKit::WebGLId createQueryEXT();
  virtual void deleteQueryEXT(WebKit::WebGLId query) {}
  virtual WebKit::WGC3Dboolean isQueryEXT(WebKit::WebGLId query);
  virtual void beginQueryEXT(
      WebKit::WGC3Denum target,
      WebKit::WebGLId query) {}
  virtual void endQueryEXT(WebKit::WGC3Denum target);
  virtual void getQueryivEXT(
      WebKit::WGC3Denum target,
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dint* params) {}
  virtual void getQueryObjectuivEXT(
      WebKit::WebGLId query,
      WebKit::WGC3Denum pname,
      WebKit::WGC3Duint* params);

  virtual void setContextLostCallback(
      WebGraphicsContextLostCallback* callback);

  virtual void loseContextCHROMIUM(WebKit::WGC3Denum current,
                                   WebKit::WGC3Denum other);

  virtual void drawBuffersEXT(WebKit::WGC3Dsizei m,
                              const WebKit::WGC3Denum* bufs) {}

  virtual void bindTexImage2DCHROMIUM(WebKit::WGC3Denum target,
                                      WebKit::WGC3Dint image_id) {}

  // GL_CHROMIUM_gpu_memory_buffer
  virtual WebKit::WGC3Duint createImageCHROMIUM(
      WebKit::WGC3Dsizei width,
      WebKit::WGC3Dsizei height,
      WebKit::WGC3Denum internalformat);
  virtual void destroyImageCHROMIUM(WebKit::WGC3Duint image_id) {}
  virtual void getImageParameterivCHROMIUM(
      WebKit::WGC3Duint image_id,
      WebKit::WGC3Denum pname,
      WebKit::WGC3Dint* params) {}
  virtual void* mapImageCHROMIUM(
      WebKit::WGC3Duint image_id,
      WebKit::WGC3Denum access);
  virtual void unmapImageCHROMIUM(WebKit::WGC3Duint image_id) {}

 private:
  DISALLOW_COPY_AND_ASSIGN(FakeWebGraphicsContext3D);
};

}  // namespace cc

#endif  // CC_DEBUG_FAKE_WEB_GRAPHICS_CONTEXT_3D_H_