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

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

Issue 10440019: Add support for GL_CHROMIUM_pixel_transfer_buffer_object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
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>
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 "../client/buffer_tracker.h"
17 #include "../client/client_context_state.h"
18 #include "../client/gles2_cmd_helper.h"
19 #include "../client/gles2_interface.h"
20 #include "../client/query_tracker.h"
21 #include "../client/ref_counted.h"
22 #include "../client/ring_buffer.h"
23 #include "../client/share_group.h"
16 #include "../common/compiler_specific.h" 24 #include "../common/compiler_specific.h"
17 #include "../common/debug_marker_manager.h" 25 #include "../common/debug_marker_manager.h"
18 #include "../common/gles2_cmd_utils.h" 26 #include "../common/gles2_cmd_utils.h"
19 #include "../common/scoped_ptr.h" 27 #include "../common/scoped_ptr.h"
20 #include "../client/ref_counted.h"
21 #include "../client/client_context_state.h"
22 #include "../client/gles2_cmd_helper.h"
23 #include "../client/gles2_interface.h"
24 #include "../client/query_tracker.h"
25 #include "../client/ring_buffer.h"
26 #include "../client/share_group.h"
27 #include "gles2_impl_export.h" 28 #include "gles2_impl_export.h"
28 29
29 #if !defined(NDEBUG) && !defined(__native_client__) && !defined(GLES2_CONFORMANC E_TESTS) // NOLINT 30 #if !defined(NDEBUG) && !defined(__native_client__) && !defined(GLES2_CONFORMANC E_TESTS) // NOLINT
30 #if defined(GLES2_INLINE_OPTIMIZATION) 31 #if defined(GLES2_INLINE_OPTIMIZATION)
31 // TODO(gman): Replace with macros that work with inline optmization. 32 // TODO(gman): Replace with macros that work with inline optmization.
32 #define GPU_CLIENT_SINGLE_THREAD_CHECK() 33 #define GPU_CLIENT_SINGLE_THREAD_CHECK()
33 #define GPU_CLIENT_LOG(args) 34 #define GPU_CLIENT_LOG(args)
34 #define GPU_CLIENT_LOG_CODE_BLOCK(code) 35 #define GPU_CLIENT_LOG_CODE_BLOCK(code)
35 #define GPU_CLIENT_DCHECK_CODE_BLOCK(code) 36 #define GPU_CLIENT_DCHECK_CODE_BLOCK(code)
36 #else 37 #else
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 453
453 IdHandlerInterface* GetIdHandler(int id_namespace) const; 454 IdHandlerInterface* GetIdHandler(int id_namespace) const;
454 455
455 void FinishHelper(); 456 void FinishHelper();
456 457
457 // Asserts that the context is lost. 458 // Asserts that the context is lost.
458 // NOTE: This is an expensive call and should only be called 459 // NOTE: This is an expensive call and should only be called
459 // for error checking. 460 // for error checking.
460 bool MustBeContextLost(); 461 bool MustBeContextLost();
461 462
463 BufferTracker::Buffer* GetBoundPixelUnpackTransferBufferIfValid(
464 const char* function_name, GLuint offset, GLsizei size);
465
462 const std::string& GetLogPrefix() const; 466 const std::string& GetLogPrefix() const;
463 467
464 GLES2Util util_; 468 GLES2Util util_;
465 GLES2CmdHelper* helper_; 469 GLES2CmdHelper* helper_;
466 TransferBufferInterface* transfer_buffer_; 470 TransferBufferInterface* transfer_buffer_;
467 std::string last_error_; 471 std::string last_error_;
468 DebugMarkerManager debug_marker_manager_; 472 DebugMarkerManager debug_marker_manager_;
469 std::string this_in_hex_; 473 std::string this_in_hex_;
470 474
471 std::queue<int32> swap_buffers_tokens_; 475 std::queue<int32> swap_buffers_tokens_;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 511
508 // The program in use by glUseProgram 512 // The program in use by glUseProgram
509 GLuint current_program_; 513 GLuint current_program_;
510 514
511 // The currently bound array buffer. 515 // The currently bound array buffer.
512 GLuint bound_array_buffer_id_; 516 GLuint bound_array_buffer_id_;
513 517
514 // The currently bound element array buffer. 518 // The currently bound element array buffer.
515 GLuint bound_element_array_buffer_id_; 519 GLuint bound_element_array_buffer_id_;
516 520
521 // The currently bound pixel transfer buffer.
522 GLuint bound_pixel_unpack_transfer_buffer_id_;
523
517 // GL names for the buffers used to emulate client side buffers. 524 // GL names for the buffers used to emulate client side buffers.
518 GLuint client_side_array_id_; 525 GLuint client_side_array_id_;
519 GLuint client_side_element_array_id_; 526 GLuint client_side_element_array_id_;
520 527
521 // Info for each vertex attribute saved so we can simulate client side 528 // Info for each vertex attribute saved so we can simulate client side
522 // buffers. 529 // buffers.
523 scoped_ptr<ClientSideBufferHelper> client_side_buffer_helper_; 530 scoped_ptr<ClientSideBufferHelper> client_side_buffer_helper_;
524 531
525 // The currently bound vertex array object (VAO) 532 // The currently bound vertex array object (VAO)
526 GLuint bound_vertex_array_id_; 533 GLuint bound_vertex_array_id_;
(...skipping 24 matching lines...) Expand all
551 typedef std::map<const void*, MappedTexture> MappedTextureMap; 558 typedef std::map<const void*, MappedTexture> MappedTextureMap;
552 MappedTextureMap mapped_textures_; 559 MappedTextureMap mapped_textures_;
553 560
554 scoped_ptr<MappedMemoryManager> mapped_memory_; 561 scoped_ptr<MappedMemoryManager> mapped_memory_;
555 562
556 scoped_refptr<ShareGroup> share_group_; 563 scoped_refptr<ShareGroup> share_group_;
557 564
558 scoped_ptr<QueryTracker> query_tracker_; 565 scoped_ptr<QueryTracker> query_tracker_;
559 QueryTracker::Query* current_query_; 566 QueryTracker::Query* current_query_;
560 567
568 scoped_ptr<BufferTracker> buffer_tracker_;
569
561 ErrorMessageCallback* error_message_callback_; 570 ErrorMessageCallback* error_message_callback_;
562 571
563 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); 572 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation);
564 }; 573 };
565 574
566 inline bool GLES2Implementation::GetBufferParameterivHelper( 575 inline bool GLES2Implementation::GetBufferParameterivHelper(
567 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { 576 GLenum /* target */, GLenum /* pname */, GLint* /* params */) {
568 return false; 577 return false;
569 } 578 }
570 579
(...skipping 22 matching lines...) Expand all
593 602
594 inline bool GLES2Implementation::GetTexParameterivHelper( 603 inline bool GLES2Implementation::GetTexParameterivHelper(
595 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { 604 GLenum /* target */, GLenum /* pname */, GLint* /* params */) {
596 return false; 605 return false;
597 } 606 }
598 607
599 } // namespace gles2 608 } // namespace gles2
600 } // namespace gpu 609 } // namespace gpu
601 610
602 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ 611 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698