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 GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
6 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
7 | 7 |
8 #include <GLES2/gl2.h> | 8 #include <GLES2/gl2.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <queue> | 11 #include <queue> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "../common/gles2_cmd_utils.h" | 16 #include "../common/gles2_cmd_utils.h" |
17 #include "../common/scoped_ptr.h" | 17 #include "../common/scoped_ptr.h" |
| 18 #include "../client/buffer_tracker.h" |
18 #include "../client/ref_counted.h" | 19 #include "../client/ref_counted.h" |
19 #include "../client/gles2_cmd_helper.h" | 20 #include "../client/gles2_cmd_helper.h" |
20 #include "../client/query_tracker.h" | 21 #include "../client/query_tracker.h" |
21 #include "../client/ring_buffer.h" | 22 #include "../client/ring_buffer.h" |
22 #include "../client/share_group.h" | 23 #include "../client/share_group.h" |
23 #include "gles2_impl_export.h" | 24 #include "gles2_impl_export.h" |
24 | 25 |
25 #if !defined(NDEBUG) && !defined(__native_client__) && !defined(GLES2_CONFORMANC
E_TESTS) // NOLINT | 26 #if !defined(NDEBUG) && !defined(__native_client__) && !defined(GLES2_CONFORMANC
E_TESTS) // NOLINT |
26 #if defined(GLES2_INLINE_OPTIMIZATION) | 27 #if defined(GLES2_INLINE_OPTIMIZATION) |
27 // TODO(gman): Replace with macros that work with inline optmization. | 28 // TODO(gman): Replace with macros that work with inline optmization. |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 | 513 |
513 GLuint bound_framebuffer_; | 514 GLuint bound_framebuffer_; |
514 GLuint bound_renderbuffer_; | 515 GLuint bound_renderbuffer_; |
515 | 516 |
516 // The currently bound array buffer. | 517 // The currently bound array buffer. |
517 GLuint bound_array_buffer_id_; | 518 GLuint bound_array_buffer_id_; |
518 | 519 |
519 // The currently bound element array buffer. | 520 // The currently bound element array buffer. |
520 GLuint bound_element_array_buffer_id_; | 521 GLuint bound_element_array_buffer_id_; |
521 | 522 |
| 523 // The currently bound pixel transfer buffers. |
| 524 GLuint bound_pixel_pack_transfer_buffer_id_; |
| 525 GLuint bound_pixel_unpack_transfer_buffer_id_; |
| 526 |
522 // GL names for the buffers used to emulate client side buffers. | 527 // GL names for the buffers used to emulate client side buffers. |
523 GLuint client_side_array_id_; | 528 GLuint client_side_array_id_; |
524 GLuint client_side_element_array_id_; | 529 GLuint client_side_element_array_id_; |
525 | 530 |
526 // Info for each vertex attribute saved so we can simulate client side | 531 // Info for each vertex attribute saved so we can simulate client side |
527 // buffers. | 532 // buffers. |
528 scoped_ptr<ClientSideBufferHelper> client_side_buffer_helper_; | 533 scoped_ptr<ClientSideBufferHelper> client_side_buffer_helper_; |
529 | 534 |
530 GLuint reserved_ids_[2]; | 535 GLuint reserved_ids_[2]; |
531 | 536 |
(...skipping 21 matching lines...) Expand all Loading... |
553 typedef std::map<const void*, MappedTexture> MappedTextureMap; | 558 typedef std::map<const void*, MappedTexture> MappedTextureMap; |
554 MappedTextureMap mapped_textures_; | 559 MappedTextureMap mapped_textures_; |
555 | 560 |
556 scoped_ptr<MappedMemoryManager> mapped_memory_; | 561 scoped_ptr<MappedMemoryManager> mapped_memory_; |
557 | 562 |
558 scoped_refptr<ShareGroup> share_group_; | 563 scoped_refptr<ShareGroup> share_group_; |
559 | 564 |
560 scoped_ptr<QueryTracker> query_tracker_; | 565 scoped_ptr<QueryTracker> query_tracker_; |
561 QueryTracker::Query* current_query_; | 566 QueryTracker::Query* current_query_; |
562 | 567 |
| 568 scoped_ptr<BufferTracker> buffer_tracker_; |
| 569 |
563 ErrorMessageCallback* error_message_callback_; | 570 ErrorMessageCallback* error_message_callback_; |
564 | 571 |
565 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); | 572 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); |
566 }; | 573 }; |
567 | 574 |
568 inline bool GLES2Implementation::GetBufferParameterivHelper( | 575 inline bool GLES2Implementation::GetBufferParameterivHelper( |
569 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 576 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
570 return false; | 577 return false; |
571 } | 578 } |
572 | 579 |
(...skipping 22 matching lines...) Expand all Loading... |
595 | 602 |
596 inline bool GLES2Implementation::GetTexParameterivHelper( | 603 inline bool GLES2Implementation::GetTexParameterivHelper( |
597 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 604 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
598 return false; | 605 return false; |
599 } | 606 } |
600 | 607 |
601 } // namespace gles2 | 608 } // namespace gles2 |
602 } // namespace gpu | 609 } // namespace gpu |
603 | 610 |
604 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 611 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
OLD | NEW |