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

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: convert newly added scoped_ptr's 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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 738
739 // unpack skip rows as last set by glPixelStorei 739 // unpack skip rows as last set by glPixelStorei
740 GLint unpack_skip_rows_; 740 GLint unpack_skip_rows_;
741 741
742 // unpack skip pixels as last set by glPixelStorei 742 // unpack skip pixels as last set by glPixelStorei
743 GLint unpack_skip_pixels_; 743 GLint unpack_skip_pixels_;
744 744
745 // unpack skip images as last set by glPixelStorei 745 // unpack skip images as last set by glPixelStorei
746 GLint unpack_skip_images_; 746 GLint unpack_skip_images_;
747 747
748 scoped_ptr<TextureUnit[]> texture_units_; 748 std::unique_ptr<TextureUnit[]> texture_units_;
749 749
750 // 0 to gl_state_.max_combined_texture_image_units. 750 // 0 to gl_state_.max_combined_texture_image_units.
751 GLuint active_texture_unit_; 751 GLuint active_texture_unit_;
752 752
753 GLuint bound_framebuffer_; 753 GLuint bound_framebuffer_;
754 GLuint bound_read_framebuffer_; 754 GLuint bound_read_framebuffer_;
755 GLuint bound_renderbuffer_; 755 GLuint bound_renderbuffer_;
756 GLuint bound_valuebuffer_; 756 GLuint bound_valuebuffer_;
757 757
758 // The program in use by glUseProgram 758 // The program in use by glUseProgram
759 GLuint current_program_; 759 GLuint current_program_;
760 760
761 GLuint bound_array_buffer_; 761 GLuint bound_array_buffer_;
762 GLuint bound_copy_read_buffer_; 762 GLuint bound_copy_read_buffer_;
763 GLuint bound_copy_write_buffer_; 763 GLuint bound_copy_write_buffer_;
764 GLuint bound_pixel_pack_buffer_; 764 GLuint bound_pixel_pack_buffer_;
765 GLuint bound_pixel_unpack_buffer_; 765 GLuint bound_pixel_unpack_buffer_;
766 GLuint bound_transform_feedback_buffer_; 766 GLuint bound_transform_feedback_buffer_;
767 GLuint bound_uniform_buffer_; 767 GLuint bound_uniform_buffer_;
768 768
769 // The currently bound pixel transfer buffers. 769 // The currently bound pixel transfer buffers.
770 GLuint bound_pixel_pack_transfer_buffer_id_; 770 GLuint bound_pixel_pack_transfer_buffer_id_;
771 GLuint bound_pixel_unpack_transfer_buffer_id_; 771 GLuint bound_pixel_unpack_transfer_buffer_id_;
772 772
773 // Client side management for vertex array objects. Needed to correctly 773 // Client side management for vertex array objects. Needed to correctly
774 // track client side arrays. 774 // track client side arrays.
775 scoped_ptr<VertexArrayObjectManager> vertex_array_object_manager_; 775 std::unique_ptr<VertexArrayObjectManager> vertex_array_object_manager_;
776 776
777 GLuint reserved_ids_[2]; 777 GLuint reserved_ids_[2];
778 778
779 // Current GL error bits. 779 // Current GL error bits.
780 uint32_t error_bits_; 780 uint32_t error_bits_;
781 781
782 // Whether or not to print debugging info. 782 // Whether or not to print debugging info.
783 bool debug_; 783 bool debug_;
784 784
785 // When true, the context is lost when a GL_OUT_OF_MEMORY error occurs. 785 // When true, the context is lost when a GL_OUT_OF_MEMORY error occurs.
(...skipping 21 matching lines...) Expand all
807 typedef std::map<const void*, MappedBuffer> MappedBufferMap; 807 typedef std::map<const void*, MappedBuffer> MappedBufferMap;
808 MappedBufferMap mapped_buffers_; 808 MappedBufferMap mapped_buffers_;
809 809
810 // TODO(zmo): Consolidate |mapped_buffers_| and |mapped_buffer_range_map_|. 810 // TODO(zmo): Consolidate |mapped_buffers_| and |mapped_buffer_range_map_|.
811 typedef base::hash_map<GLuint, MappedBuffer> MappedBufferRangeMap; 811 typedef base::hash_map<GLuint, MappedBuffer> MappedBufferRangeMap;
812 MappedBufferRangeMap mapped_buffer_range_map_; 812 MappedBufferRangeMap mapped_buffer_range_map_;
813 813
814 typedef std::map<const void*, MappedTexture> MappedTextureMap; 814 typedef std::map<const void*, MappedTexture> MappedTextureMap;
815 MappedTextureMap mapped_textures_; 815 MappedTextureMap mapped_textures_;
816 816
817 scoped_ptr<MappedMemoryManager> mapped_memory_; 817 std::unique_ptr<MappedMemoryManager> mapped_memory_;
818 818
819 scoped_refptr<ShareGroup> share_group_; 819 scoped_refptr<ShareGroup> share_group_;
820 ShareGroupContextData share_group_context_data_; 820 ShareGroupContextData share_group_context_data_;
821 821
822 scoped_ptr<QueryTracker> query_tracker_; 822 std::unique_ptr<QueryTracker> query_tracker_;
823 scoped_ptr<IdAllocator> query_id_allocator_; 823 std::unique_ptr<IdAllocator> query_id_allocator_;
824 824
825 scoped_ptr<BufferTracker> buffer_tracker_; 825 std::unique_ptr<BufferTracker> buffer_tracker_;
826 826
827 base::Callback<void(const char*, int32_t)> error_message_callback_; 827 base::Callback<void(const char*, int32_t)> error_message_callback_;
828 base::Closure lost_context_callback_; 828 base::Closure lost_context_callback_;
829 #if DCHECK_IS_ON() 829 #if DCHECK_IS_ON()
830 bool lost_context_ = false; 830 bool lost_context_ = false;
831 #endif 831 #endif
832 832
833 int current_trace_stack_; 833 int current_trace_stack_;
834 834
835 GpuControl* gpu_control_; 835 GpuControl* gpu_control_;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 890
891 inline bool GLES2Implementation::GetTexParameterivHelper( 891 inline bool GLES2Implementation::GetTexParameterivHelper(
892 GLenum /* target */, GLenum /* pname */, GLint* /* params */) { 892 GLenum /* target */, GLenum /* pname */, GLint* /* params */) {
893 return false; 893 return false;
894 } 894 }
895 895
896 } // namespace gles2 896 } // namespace gles2
897 } // namespace gpu 897 } // namespace gpu
898 898
899 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_ 899 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698