| 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 CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 class TransferBuffer; | 34 class TransferBuffer; |
| 35 | 35 |
| 36 namespace gles2 { | 36 namespace gles2 { |
| 37 class GLES2CmdHelper; | 37 class GLES2CmdHelper; |
| 38 class GLES2Implementation; | 38 class GLES2Implementation; |
| 39 } | 39 } |
| 40 } | 40 } |
| 41 | 41 |
| 42 using WebKit::WebGLId; | 42 using WebKit::WebGLId; |
| 43 | 43 |
| 44 using WebKit::WGC3Dbyte; |
| 44 using WebKit::WGC3Dchar; | 45 using WebKit::WGC3Dchar; |
| 45 using WebKit::WGC3Denum; | 46 using WebKit::WGC3Denum; |
| 46 using WebKit::WGC3Dboolean; | 47 using WebKit::WGC3Dboolean; |
| 47 using WebKit::WGC3Dbitfield; | 48 using WebKit::WGC3Dbitfield; |
| 48 using WebKit::WGC3Dint; | 49 using WebKit::WGC3Dint; |
| 49 using WebKit::WGC3Dsizei; | 50 using WebKit::WGC3Dsizei; |
| 50 using WebKit::WGC3Duint; | 51 using WebKit::WGC3Duint; |
| 51 using WebKit::WGC3Dfloat; | 52 using WebKit::WGC3Dfloat; |
| 52 using WebKit::WGC3Dclampf; | 53 using WebKit::WGC3Dclampf; |
| 53 using WebKit::WGC3Dintptr; | 54 using WebKit::WGC3Dintptr; |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 virtual void drawArrays(WGC3Denum mode, WGC3Dint first, WGC3Dsizei count); | 241 virtual void drawArrays(WGC3Denum mode, WGC3Dint first, WGC3Dsizei count); |
| 241 virtual void drawElements(WGC3Denum mode, | 242 virtual void drawElements(WGC3Denum mode, |
| 242 WGC3Dsizei count, | 243 WGC3Dsizei count, |
| 243 WGC3Denum type, | 244 WGC3Denum type, |
| 244 WGC3Dintptr offset); | 245 WGC3Dintptr offset); |
| 245 | 246 |
| 246 virtual void enable(WGC3Denum cap); | 247 virtual void enable(WGC3Denum cap); |
| 247 virtual void enableVertexAttribArray(WGC3Duint index); | 248 virtual void enableVertexAttribArray(WGC3Duint index); |
| 248 virtual void finish(); | 249 virtual void finish(); |
| 249 virtual void flush(); | 250 virtual void flush(); |
| 250 virtual void shallowFlushCHROMIUM(); | |
| 251 virtual void framebufferRenderbuffer(WGC3Denum target, | 251 virtual void framebufferRenderbuffer(WGC3Denum target, |
| 252 WGC3Denum attachment, | 252 WGC3Denum attachment, |
| 253 WGC3Denum renderbuffertarget, | 253 WGC3Denum renderbuffertarget, |
| 254 WebGLId renderbuffer); | 254 WebGLId renderbuffer); |
| 255 virtual void framebufferTexture2D(WGC3Denum target, | 255 virtual void framebufferTexture2D(WGC3Denum target, |
| 256 WGC3Denum attachment, | 256 WGC3Denum attachment, |
| 257 WGC3Denum textarget, | 257 WGC3Denum textarget, |
| 258 WebGLId texture, | 258 WebGLId texture, |
| 259 WGC3Dint level); | 259 WGC3Dint level); |
| 260 virtual void frontFace(WGC3Denum mode); | 260 virtual void frontFace(WGC3Denum mode); |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 virtual void getQueryObjectuivEXT( | 567 virtual void getQueryObjectuivEXT( |
| 568 WebGLId query, WGC3Denum pname, WGC3Duint* params); | 568 WebGLId query, WGC3Denum pname, WGC3Duint* params); |
| 569 | 569 |
| 570 virtual void copyTextureCHROMIUM(WGC3Denum target, WebGLId source_id, | 570 virtual void copyTextureCHROMIUM(WGC3Denum target, WebGLId source_id, |
| 571 WebGLId dest_id, WGC3Dint level, | 571 WebGLId dest_id, WGC3Dint level, |
| 572 WGC3Denum internal_format); | 572 WGC3Denum internal_format); |
| 573 | 573 |
| 574 virtual void bindUniformLocationCHROMIUM(WebGLId program, WGC3Dint location, | 574 virtual void bindUniformLocationCHROMIUM(WebGLId program, WGC3Dint location, |
| 575 const WGC3Dchar* uniform); | 575 const WGC3Dchar* uniform); |
| 576 | 576 |
| 577 virtual void shallowFlushCHROMIUM(); |
| 578 |
| 579 virtual void genMailboxCHROMIUM(WGC3Dbyte* mailbox); |
| 580 virtual void produceTextureCHROMIUM(WGC3Denum target, |
| 581 const WGC3Dbyte* mailbox); |
| 582 virtual void consumeTextureCHROMIUM(WGC3Denum target, |
| 583 const WGC3Dbyte* mailbox); |
| 584 |
| 577 protected: | 585 protected: |
| 578 virtual GrGLInterface* onCreateGrGLInterface(); | 586 virtual GrGLInterface* onCreateGrGLInterface(); |
| 579 | 587 |
| 580 private: | 588 private: |
| 581 // These are the same error codes as used by EGL. | 589 // These are the same error codes as used by EGL. |
| 582 enum Error { | 590 enum Error { |
| 583 SUCCESS = 0x3000, | 591 SUCCESS = 0x3000, |
| 584 BAD_ATTRIBUTE = 0x3004, | 592 BAD_ATTRIBUTE = 0x3004, |
| 585 CONTEXT_LOST = 0x300E | 593 CONTEXT_LOST = 0x300E |
| 586 }; | 594 }; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 CommandBufferProxy* command_buffer_; | 709 CommandBufferProxy* command_buffer_; |
| 702 gpu::gles2::GLES2CmdHelper* gles2_helper_; | 710 gpu::gles2::GLES2CmdHelper* gles2_helper_; |
| 703 gpu::TransferBuffer* transfer_buffer_; | 711 gpu::TransferBuffer* transfer_buffer_; |
| 704 gpu::gles2::GLES2Implementation* gl_; | 712 gpu::gles2::GLES2Implementation* gl_; |
| 705 Error last_error_; | 713 Error last_error_; |
| 706 int frame_number_; | 714 int frame_number_; |
| 707 bool bind_generates_resources_; | 715 bool bind_generates_resources_; |
| 708 }; | 716 }; |
| 709 | 717 |
| 710 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ | 718 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ |
| OLD | NEW |