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

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: rebase 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 508
508 // The program in use by glUseProgram 509 // The program in use by glUseProgram
509 GLuint current_program_; 510 GLuint current_program_;
510 511
511 // The currently bound array buffer. 512 // The currently bound array buffer.
512 GLuint bound_array_buffer_id_; 513 GLuint bound_array_buffer_id_;
513 514
514 // The currently bound element array buffer. 515 // The currently bound element array buffer.
515 GLuint bound_element_array_buffer_id_; 516 GLuint bound_element_array_buffer_id_;
516 517
518 // The currently bound pixel transfer buffer.
519 GLuint bound_pixel_unpack_transfer_buffer_id_;
520
517 // GL names for the buffers used to emulate client side buffers. 521 // GL names for the buffers used to emulate client side buffers.
518 GLuint client_side_array_id_; 522 GLuint client_side_array_id_;
519 GLuint client_side_element_array_id_; 523 GLuint client_side_element_array_id_;
520 524
521 // Info for each vertex attribute saved so we can simulate client side 525 // Info for each vertex attribute saved so we can simulate client side
522 // buffers. 526 // buffers.
523 scoped_ptr<ClientSideBufferHelper> client_side_buffer_helper_; 527 scoped_ptr<ClientSideBufferHelper> client_side_buffer_helper_;
524 528
525 // The currently bound vertex array object (VAO) 529 // The currently bound vertex array object (VAO)
526 GLuint bound_vertex_array_id_; 530 GLuint bound_vertex_array_id_;
(...skipping 24 matching lines...) Expand all
551 typedef std::map<const void*, MappedTexture> MappedTextureMap; 555 typedef std::map<const void*, MappedTexture> MappedTextureMap;
552 MappedTextureMap mapped_textures_; 556 MappedTextureMap mapped_textures_;
553 557
554 scoped_ptr<MappedMemoryManager> mapped_memory_; 558 scoped_ptr<MappedMemoryManager> mapped_memory_;
555 559
556 scoped_refptr<ShareGroup> share_group_; 560 scoped_refptr<ShareGroup> share_group_;
557 561
558 scoped_ptr<QueryTracker> query_tracker_; 562 scoped_ptr<QueryTracker> query_tracker_;
559 QueryTracker::Query* current_query_; 563 QueryTracker::Query* current_query_;
560 564
565 scoped_ptr<BufferTracker> buffer_tracker_;
566
561 ErrorMessageCallback* error_message_callback_; 567 ErrorMessageCallback* error_message_callback_;
562 568
563 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation); 569 DISALLOW_COPY_AND_ASSIGN(GLES2Implementation);
564 }; 570 };
565 571
566 inline bool GLES2Implementation::GetBufferParameterivHelper( 572 inline bool GLES2Implementation::GetBufferParameterivHelper(
567 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { 573 GLenum /* target */, GLenum /* pname */, GLint* /* params */) {
568 return false; 574 return false;
569 } 575 }
570 576
(...skipping 22 matching lines...) Expand all
593 599
594 inline bool GLES2Implementation::GetTexParameterivHelper( 600 inline bool GLES2Implementation::GetTexParameterivHelper(
595 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { 601 GLenum /* target */, GLenum /* pname */, GLint* /* params */) {
596 return false; 602 return false;
597 } 603 }
598 604
599 } // namespace gles2 605 } // namespace gles2
600 } // namespace gpu 606 } // namespace gpu
601 607
602 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ 608 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698