OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_GL_GL_IMAGE_SHARED_MEMORY_H_ | 5 #ifndef UI_GL_GL_IMAGE_SHARED_MEMORY_H_ |
6 #define UI_GL_GL_IMAGE_SHARED_MEMORY_H_ | 6 #define UI_GL_GL_IMAGE_SHARED_MEMORY_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
| 11 #include <memory> |
| 12 |
11 #include "base/macros.h" | 13 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "base/memory/shared_memory_handle.h" | 14 #include "base/memory/shared_memory_handle.h" |
14 #include "ui/gfx/generic_shared_memory_id.h" | 15 #include "ui/gfx/generic_shared_memory_id.h" |
15 #include "ui/gl/gl_image_memory.h" | 16 #include "ui/gl/gl_image_memory.h" |
16 | 17 |
17 namespace base { | 18 namespace base { |
18 class SharedMemory; | 19 class SharedMemory; |
19 } | 20 } |
20 | 21 |
21 namespace gl { | 22 namespace gl { |
22 | 23 |
(...skipping 10 matching lines...) Expand all Loading... |
33 // Overridden from GLImage: | 34 // Overridden from GLImage: |
34 void Destroy(bool have_context) override; | 35 void Destroy(bool have_context) override; |
35 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 36 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
36 uint64_t process_tracing_id, | 37 uint64_t process_tracing_id, |
37 const std::string& dump_name) override; | 38 const std::string& dump_name) override; |
38 | 39 |
39 protected: | 40 protected: |
40 ~GLImageSharedMemory() override; | 41 ~GLImageSharedMemory() override; |
41 | 42 |
42 private: | 43 private: |
43 scoped_ptr<base::SharedMemory> shared_memory_; | 44 std::unique_ptr<base::SharedMemory> shared_memory_; |
44 gfx::GenericSharedMemoryId shared_memory_id_; | 45 gfx::GenericSharedMemoryId shared_memory_id_; |
45 | 46 |
46 DISALLOW_COPY_AND_ASSIGN(GLImageSharedMemory); | 47 DISALLOW_COPY_AND_ASSIGN(GLImageSharedMemory); |
47 }; | 48 }; |
48 | 49 |
49 } // namespace gl | 50 } // namespace gl |
50 | 51 |
51 #endif // UI_GL_GL_IMAGE_SHARED_MEMORY_H_ | 52 #endif // UI_GL_GL_IMAGE_SHARED_MEMORY_H_ |
OLD | NEW |