OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ | 5 #ifndef WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ |
6 #define WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ | 6 #define WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ |
7 | 7 |
8 #if defined(ENABLE_GPU) | 8 #if defined(ENABLE_GPU) |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 // Support for buffer creation and deletion | 396 // Support for buffer creation and deletion |
397 virtual WebGLId createBuffer(); | 397 virtual WebGLId createBuffer(); |
398 virtual WebGLId createFramebuffer(); | 398 virtual WebGLId createFramebuffer(); |
399 virtual WebGLId createProgram(); | 399 virtual WebGLId createProgram(); |
400 virtual WebGLId createRenderbuffer(); | 400 virtual WebGLId createRenderbuffer(); |
401 virtual WebGLId createShader(WGC3Denum); | 401 virtual WebGLId createShader(WGC3Denum); |
402 virtual WebGLId createTexture(); | 402 virtual WebGLId createTexture(); |
403 | 403 |
404 virtual void deleteBuffer(WebGLId); | 404 virtual void deleteBuffer(WebGLId); |
405 virtual void deleteFramebuffer(WebGLId); | 405 virtual void deleteFramebuffer(WebGLId); |
| 406 virtual void deleteImageBuffer(WebGLId); |
406 virtual void deleteProgram(WebGLId); | 407 virtual void deleteProgram(WebGLId); |
407 virtual void deleteRenderbuffer(WebGLId); | 408 virtual void deleteRenderbuffer(WebGLId); |
408 virtual void deleteShader(WebGLId); | 409 virtual void deleteShader(WebGLId); |
409 virtual void deleteTexture(WebGLId); | 410 virtual void deleteTexture(WebGLId); |
410 | 411 |
411 virtual void synthesizeGLError(WGC3Denum); | 412 virtual void synthesizeGLError(WGC3Denum); |
412 | 413 |
413 virtual void* mapBufferSubDataCHROMIUM( | 414 virtual void* mapBufferSubDataCHROMIUM( |
414 WGC3Denum target, WGC3Dintptr offset, | 415 WGC3Denum target, WGC3Dintptr offset, |
415 WGC3Dsizeiptr size, WGC3Denum access); | 416 WGC3Dsizeiptr size, WGC3Denum access); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 virtual void texImageIOSurface2DCHROMIUM( | 468 virtual void texImageIOSurface2DCHROMIUM( |
468 WGC3Denum target, WGC3Dint width, WGC3Dint height, | 469 WGC3Denum target, WGC3Dint width, WGC3Dint height, |
469 WGC3Duint ioSurfaceId, WGC3Duint plane); | 470 WGC3Duint ioSurfaceId, WGC3Duint plane); |
470 | 471 |
471 virtual void bindTexImage2DCHROMIUM(WGC3Denum target, WGC3Dint imageId); | 472 virtual void bindTexImage2DCHROMIUM(WGC3Denum target, WGC3Dint imageId); |
472 virtual void releaseTexImage2DCHROMIUM(WGC3Denum target, WGC3Dint imageId); | 473 virtual void releaseTexImage2DCHROMIUM(WGC3Denum target, WGC3Dint imageId); |
473 | 474 |
474 virtual void texStorage2DEXT( | 475 virtual void texStorage2DEXT( |
475 WGC3Denum target, WGC3Dint levels, WGC3Duint internalformat, | 476 WGC3Denum target, WGC3Dint levels, WGC3Duint internalformat, |
476 WGC3Dint width, WGC3Dint height); | 477 WGC3Dint width, WGC3Dint height); |
| 478 virtual void createGpuMemoryBuffer2DCHROMIUM( |
| 479 WGC3Duint image_id, WGC3Dint width, WGC3Dint height); |
477 | 480 |
478 virtual WebGLId createQueryEXT(); | 481 virtual WebGLId createQueryEXT(); |
479 virtual void deleteQueryEXT(WebGLId query); | 482 virtual void deleteQueryEXT(WebGLId query); |
480 virtual WGC3Dboolean isQueryEXT(WebGLId query); | 483 virtual WGC3Dboolean isQueryEXT(WebGLId query); |
481 virtual void beginQueryEXT(WGC3Denum target, WebGLId query); | 484 virtual void beginQueryEXT(WGC3Denum target, WebGLId query); |
482 virtual void endQueryEXT(WGC3Denum target); | 485 virtual void endQueryEXT(WGC3Denum target); |
483 virtual void getQueryivEXT( | 486 virtual void getQueryivEXT( |
484 WGC3Denum target, WGC3Denum pname, WGC3Dint* params); | 487 WGC3Denum target, WGC3Denum pname, WGC3Dint* params); |
485 virtual void getQueryObjectuivEXT( | 488 virtual void getQueryObjectuivEXT( |
486 WebGLId query, WGC3Denum pname, WGC3Duint* params); | 489 WebGLId query, WGC3Denum pname, WGC3Duint* params); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 // SwapBuffers callback. | 558 // SwapBuffers callback. |
556 void OnSwapBuffersComplete(); | 559 void OnSwapBuffersComplete(); |
557 virtual void OnContextLost(); | 560 virtual void OnContextLost(); |
558 | 561 |
559 bool MaybeInitializeGL(); | 562 bool MaybeInitializeGL(); |
560 | 563 |
561 // Used to try to find bugs in code that calls gl directly through the gl api | 564 // Used to try to find bugs in code that calls gl directly through the gl api |
562 // instead of going through WebGraphicsContext3D. | 565 // instead of going through WebGraphicsContext3D. |
563 void ClearContext(); | 566 void ClearContext(); |
564 | 567 |
565 | |
566 bool is_offscreen_; | 568 bool is_offscreen_; |
567 // Only used when not offscreen. | 569 // Only used when not offscreen. |
568 gfx::AcceleratedWidget window_; | 570 gfx::AcceleratedWidget window_; |
569 | 571 |
570 bool initialized_; | 572 bool initialized_; |
571 bool initialize_failed_; | 573 bool initialize_failed_; |
572 | 574 |
573 // The context we use for OpenGL rendering. | 575 // The context we use for OpenGL rendering. |
574 GLInProcessContext* context_; | 576 GLInProcessContext* context_; |
575 // The GLES2Implementation we use for OpenGL rendering. | 577 // The GLES2Implementation we use for OpenGL rendering. |
(...skipping 15 matching lines...) Expand all Loading... |
591 void FlipVertically(uint8* framebuffer, | 593 void FlipVertically(uint8* framebuffer, |
592 unsigned int width, | 594 unsigned int width, |
593 unsigned int height); | 595 unsigned int height); |
594 }; | 596 }; |
595 | 597 |
596 } // namespace gpu | 598 } // namespace gpu |
597 } // namespace webkit | 599 } // namespace webkit |
598 | 600 |
599 #endif // defined(ENABLE_GPU) | 601 #endif // defined(ENABLE_GPU) |
600 #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ | 602 #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_COMMAND_BUFFER_IMPL_H_ |
OLD | NEW |