| 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 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 public: | 26 public: |
| 27 GLImageSharedMemory(const gfx::Size& size, unsigned internalformat); | 27 GLImageSharedMemory(const gfx::Size& size, unsigned internalformat); |
| 28 | 28 |
| 29 bool Initialize(const base::SharedMemoryHandle& handle, | 29 bool Initialize(const base::SharedMemoryHandle& handle, |
| 30 gfx::GenericSharedMemoryId shared_memory_id, | 30 gfx::GenericSharedMemoryId shared_memory_id, |
| 31 gfx::BufferFormat format, | 31 gfx::BufferFormat format, |
| 32 size_t offset, | 32 size_t offset, |
| 33 size_t stride); | 33 size_t stride); |
| 34 | 34 |
| 35 // Overridden from GLImage: | 35 // Overridden from GLImage: |
| 36 void Destroy(bool have_context) override; | |
| 37 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 36 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
| 38 uint64_t process_tracing_id, | 37 uint64_t process_tracing_id, |
| 39 const std::string& dump_name) override; | 38 const std::string& dump_name) override; |
| 40 | 39 |
| 41 protected: | 40 protected: |
| 42 ~GLImageSharedMemory() override; | 41 ~GLImageSharedMemory() override; |
| 43 | 42 |
| 44 private: | 43 private: |
| 45 std::unique_ptr<base::SharedMemory> shared_memory_; | 44 std::unique_ptr<base::SharedMemory> shared_memory_; |
| 46 gfx::GenericSharedMemoryId shared_memory_id_; | 45 gfx::GenericSharedMemoryId shared_memory_id_; |
| 47 | 46 |
| 48 DISALLOW_COPY_AND_ASSIGN(GLImageSharedMemory); | 47 DISALLOW_COPY_AND_ASSIGN(GLImageSharedMemory); |
| 49 }; | 48 }; |
| 50 | 49 |
| 51 } // namespace gl | 50 } // namespace gl |
| 52 | 51 |
| 53 #endif // UI_GL_GL_IMAGE_SHARED_MEMORY_H_ | 52 #endif // UI_GL_GL_IMAGE_SHARED_MEMORY_H_ |
| OLD | NEW |