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

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

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 8 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
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <list> 11 #include <list>
12 #include <map> 12 #include <map>
13 #include <memory>
13 #include <queue> 14 #include <queue>
14 #include <set> 15 #include <set>
15 #include <string> 16 #include <string>
16 #include <utility> 17 #include <utility>
17 #include <vector> 18 #include <vector>
18 19
19 #include "base/compiler_specific.h" 20 #include "base/compiler_specific.h"
20 #include "base/macros.h" 21 #include "base/macros.h"
21 #include "base/memory/scoped_ptr.h"
22 #include "base/memory/weak_ptr.h" 22 #include "base/memory/weak_ptr.h"
23 #include "base/trace_event/memory_dump_provider.h" 23 #include "base/trace_event/memory_dump_provider.h"
24 #include "gpu/command_buffer/client/buffer_tracker.h" 24 #include "gpu/command_buffer/client/buffer_tracker.h"
25 #include "gpu/command_buffer/client/client_context_state.h" 25 #include "gpu/command_buffer/client/client_context_state.h"
26 #include "gpu/command_buffer/client/context_support.h" 26 #include "gpu/command_buffer/client/context_support.h"
27 #include "gpu/command_buffer/client/gles2_impl_export.h" 27 #include "gpu/command_buffer/client/gles2_impl_export.h"
28 #include "gpu/command_buffer/client/gles2_interface.h" 28 #include "gpu/command_buffer/client/gles2_interface.h"
29 #include "gpu/command_buffer/client/gpu_control_client.h" 29 #include "gpu/command_buffer/client/gpu_control_client.h"
30 #include "gpu/command_buffer/client/mapped_memory.h" 30 #include "gpu/command_buffer/client/mapped_memory.h"
31 #include "gpu/command_buffer/client/ref_counted.h" 31 #include "gpu/command_buffer/client/ref_counted.h"
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 740
741 // unpack skip rows as last set by glPixelStorei 741 // unpack skip rows as last set by glPixelStorei
742 GLint unpack_skip_rows_; 742 GLint unpack_skip_rows_;
743 743
744 // unpack skip pixels as last set by glPixelStorei 744 // unpack skip pixels as last set by glPixelStorei
745 GLint unpack_skip_pixels_; 745 GLint unpack_skip_pixels_;
746 746
747 // unpack skip images as last set by glPixelStorei 747 // unpack skip images as last set by glPixelStorei
748 GLint unpack_skip_images_; 748 GLint unpack_skip_images_;
749 749
750 scoped_ptr<TextureUnit[]> texture_units_; 750 std::unique_ptr<TextureUnit[]> texture_units_;
751 751
752 // 0 to gl_state_.max_combined_texture_image_units. 752 // 0 to gl_state_.max_combined_texture_image_units.
753 GLuint active_texture_unit_; 753 GLuint active_texture_unit_;
754 754
755 GLuint bound_framebuffer_; 755 GLuint bound_framebuffer_;
756 GLuint bound_read_framebuffer_; 756 GLuint bound_read_framebuffer_;
757 GLuint bound_renderbuffer_; 757 GLuint bound_renderbuffer_;
758 GLuint bound_valuebuffer_; 758 GLuint bound_valuebuffer_;
759 759
760 // The program in use by glUseProgram 760 // The program in use by glUseProgram
761 GLuint current_program_; 761 GLuint current_program_;
762 762
763 GLuint bound_array_buffer_; 763 GLuint bound_array_buffer_;
764 GLuint bound_copy_read_buffer_; 764 GLuint bound_copy_read_buffer_;
765 GLuint bound_copy_write_buffer_; 765 GLuint bound_copy_write_buffer_;
766 GLuint bound_pixel_pack_buffer_; 766 GLuint bound_pixel_pack_buffer_;
767 GLuint bound_pixel_unpack_buffer_; 767 GLuint bound_pixel_unpack_buffer_;
768 GLuint bound_transform_feedback_buffer_; 768 GLuint bound_transform_feedback_buffer_;
769 GLuint bound_uniform_buffer_; 769 GLuint bound_uniform_buffer_;
770 770
771 // The currently bound pixel transfer buffers. 771 // The currently bound pixel transfer buffers.
772 GLuint bound_pixel_pack_transfer_buffer_id_; 772 GLuint bound_pixel_pack_transfer_buffer_id_;
773 GLuint bound_pixel_unpack_transfer_buffer_id_; 773 GLuint bound_pixel_unpack_transfer_buffer_id_;
774 774
775 // Client side management for vertex array objects. Needed to correctly 775 // Client side management for vertex array objects. Needed to correctly
776 // track client side arrays. 776 // track client side arrays.
777 scoped_ptr<VertexArrayObjectManager> vertex_array_object_manager_; 777 std::unique_ptr<VertexArrayObjectManager> vertex_array_object_manager_;
778 778
779 GLuint reserved_ids_[2]; 779 GLuint reserved_ids_[2];
780 780
781 // Current GL error bits. 781 // Current GL error bits.
782 uint32_t error_bits_; 782 uint32_t error_bits_;
783 783
784 // Whether or not to print debugging info. 784 // Whether or not to print debugging info.
785 bool debug_; 785 bool debug_;
786 786
787 // When true, the context is lost when a GL_OUT_OF_MEMORY error occurs. 787 // When true, the context is lost when a GL_OUT_OF_MEMORY error occurs.
(...skipping 21 matching lines...) Expand all
809 typedef std::map<const void*, MappedBuffer> MappedBufferMap; 809 typedef std::map<const void*, MappedBuffer> MappedBufferMap;
810 MappedBufferMap mapped_buffers_; 810 MappedBufferMap mapped_buffers_;
811 811
812 // TODO(zmo): Consolidate |mapped_buffers_| and |mapped_buffer_range_map_|. 812 // TODO(zmo): Consolidate |mapped_buffers_| and |mapped_buffer_range_map_|.
813 typedef base::hash_map<GLuint, MappedBuffer> MappedBufferRangeMap; 813 typedef base::hash_map<GLuint, MappedBuffer> MappedBufferRangeMap;
814 MappedBufferRangeMap mapped_buffer_range_map_; 814 MappedBufferRangeMap mapped_buffer_range_map_;
815 815
816 typedef std::map<const void*, MappedTexture> MappedTextureMap; 816 typedef std::map<const void*, MappedTexture> MappedTextureMap;
817 MappedTextureMap mapped_textures_; 817 MappedTextureMap mapped_textures_;
818 818
819 scoped_ptr<MappedMemoryManager> mapped_memory_; 819 std::unique_ptr<MappedMemoryManager> mapped_memory_;
820 820
821 scoped_refptr<ShareGroup> share_group_; 821 scoped_refptr<ShareGroup> share_group_;
822 ShareGroupContextData share_group_context_data_; 822 ShareGroupContextData share_group_context_data_;
823 823
824 scoped_ptr<QueryTracker> query_tracker_; 824 std::unique_ptr<QueryTracker> query_tracker_;
825 scoped_ptr<IdAllocator> query_id_allocator_; 825 std::unique_ptr<IdAllocator> query_id_allocator_;
826 826
827 scoped_ptr<BufferTracker> buffer_tracker_; 827 std::unique_ptr<BufferTracker> buffer_tracker_;
828 828
829 base::Callback<void(const char*, int32_t)> error_message_callback_; 829 base::Callback<void(const char*, int32_t)> error_message_callback_;
830 base::Closure lost_context_callback_; 830 base::Closure lost_context_callback_;
831 #if DCHECK_IS_ON() 831 #if DCHECK_IS_ON()
832 bool lost_context_ = false; 832 bool lost_context_ = false;
833 #endif 833 #endif
834 834
835 int current_trace_stack_; 835 int current_trace_stack_;
836 836
837 GpuControl* gpu_control_; 837 GpuControl* gpu_control_;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 892
893 inline bool GLES2Implementation::GetTexParameterivHelper( 893 inline bool GLES2Implementation::GetTexParameterivHelper(
894 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { 894 GLenum /* target */, GLenum /* pname */, GLint* /* params */) {
895 return false; 895 return false;
896 } 896 }
897 897
898 } // namespace gles2 898 } // namespace gles2
899 } // namespace gpu 899 } // namespace gpu
900 900
901 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ 901 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gl_in_process_context.cc ('k') | gpu/command_buffer/client/gles2_implementation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698