Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Side by Side Diff: gpu/command_buffer/client/gles2_implementation.h

Issue 10830147: Handle CONTEXT LOST issue with Queries (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698