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

Side by Side Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.h

Issue 2487783003: gpu: Directly cast ClientBuffer to gfx::GpuMemoryBuffer (Closed)
Patch Set: . Created 4 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
OLDNEW
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 CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // Overridden from gpu::GpuMemoryBufferManager: 66 // Overridden from gpu::GpuMemoryBufferManager:
67 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( 67 std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
68 const gfx::Size& size, 68 const gfx::Size& size,
69 gfx::BufferFormat format, 69 gfx::BufferFormat format,
70 gfx::BufferUsage usage, 70 gfx::BufferUsage usage,
71 gpu::SurfaceHandle surface_handle) override; 71 gpu::SurfaceHandle surface_handle) override;
72 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( 72 std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle(
73 const gfx::GpuMemoryBufferHandle& handle, 73 const gfx::GpuMemoryBufferHandle& handle,
74 const gfx::Size& size, 74 const gfx::Size& size,
75 gfx::BufferFormat format) override; 75 gfx::BufferFormat format) override;
76 gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer(
77 ClientBuffer buffer) override;
78 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, 76 void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer,
79 const gpu::SyncToken& sync_token) override; 77 const gpu::SyncToken& sync_token) override;
80 78
81 // Overridden from base::trace_event::MemoryDumpProvider: 79 // Overridden from base::trace_event::MemoryDumpProvider:
82 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, 80 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
83 base::trace_event::ProcessMemoryDump* pmd) override; 81 base::trace_event::ProcessMemoryDump* pmd) override;
84 82
85 void AllocateGpuMemoryBufferForChildProcess( 83 void AllocateGpuMemoryBufferForChildProcess(
86 gfx::GpuMemoryBufferId id, 84 gfx::GpuMemoryBufferId id,
87 const gfx::Size& size, 85 const gfx::Size& size,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; 175 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>;
178 using ClientMap = base::hash_map<int, BufferMap>; 176 using ClientMap = base::hash_map<int, BufferMap>;
179 ClientMap clients_; 177 ClientMap clients_;
180 178
181 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); 179 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager);
182 }; 180 };
183 181
184 } // namespace content 182 } // namespace content
185 183
186 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 184 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/test/test_gpu_memory_buffer_manager.cc ('k') | content/browser/gpu/browser_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698