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> |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 | 470 |
471 bool IsExtensionAvailable(const char* ext); | 471 bool IsExtensionAvailable(const char* ext); |
472 | 472 |
473 // Caches certain capabilties state. Return true if cached. | 473 // Caches certain capabilties state. Return true if cached. |
474 bool SetCapabilityState(GLenum cap, bool enabled); | 474 bool SetCapabilityState(GLenum cap, bool enabled); |
475 | 475 |
476 IdHandlerInterface* GetIdHandler(int id_namespace) const; | 476 IdHandlerInterface* GetIdHandler(int id_namespace) const; |
477 | 477 |
478 void FinishHelper(); | 478 void FinishHelper(); |
479 | 479 |
| 480 // Checks if the context is lost. |
| 481 // NOTE: This is an expensive call and should only be called |
| 482 // for error checking. |
| 483 bool MustBeContextLost(); |
| 484 |
480 GLES2Util util_; | 485 GLES2Util util_; |
481 GLES2CmdHelper* helper_; | 486 GLES2CmdHelper* helper_; |
482 TransferBufferInterface* transfer_buffer_; | 487 TransferBufferInterface* transfer_buffer_; |
483 std::string last_error_; | 488 std::string last_error_; |
484 | 489 |
485 std::queue<int32> swap_buffers_tokens_; | 490 std::queue<int32> swap_buffers_tokens_; |
486 std::queue<int32> rate_limit_tokens_; | 491 std::queue<int32> rate_limit_tokens_; |
487 | 492 |
488 ExtensionStatus angle_pack_reverse_row_order_status; | 493 ExtensionStatus angle_pack_reverse_row_order_status; |
489 | 494 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 | 565 |
561 scoped_ptr<MappedMemoryManager> mapped_memory_; | 566 scoped_ptr<MappedMemoryManager> mapped_memory_; |
562 | 567 |
563 scoped_refptr<ShareGroup> share_group_; | 568 scoped_refptr<ShareGroup> share_group_; |
564 | 569 |
565 scoped_ptr<QueryTracker> query_tracker_; | 570 scoped_ptr<QueryTracker> query_tracker_; |
566 QueryTracker::Query* current_query_; | 571 QueryTracker::Query* current_query_; |
567 | 572 |
568 ErrorMessageCallback* error_message_callback_; | 573 ErrorMessageCallback* error_message_callback_; |
569 | 574 |
| 575 bool context_lost_; |
| 576 |
570 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); | 577 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); |
571 }; | 578 }; |
572 | 579 |
573 inline bool GLES2Implementation::GetBufferParameterivHelper( | 580 inline bool GLES2Implementation::GetBufferParameterivHelper( |
574 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 581 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
575 return false; | 582 return false; |
576 } | 583 } |
577 | 584 |
578 inline bool GLES2Implementation::GetFramebufferAttachmentParameterivHelper( | 585 inline bool GLES2Implementation::GetFramebufferAttachmentParameterivHelper( |
579 GLenum /* target */, | 586 GLenum /* target */, |
(...skipping 20 matching lines...) Expand all Loading... |
600 | 607 |
601 inline bool GLES2Implementation::GetTexParameterivHelper( | 608 inline bool GLES2Implementation::GetTexParameterivHelper( |
602 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { | 609 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { |
603 return false; | 610 return false; |
604 } | 611 } |
605 | 612 |
606 } // namespace gles2 | 613 } // namespace gles2 |
607 } // namespace gpu | 614 } // namespace gpu |
608 | 615 |
609 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ | 616 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ |
OLD | NEW |