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

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

Issue 1375663002: Show GpuMemoryBuffer feature in chrome://gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix description Created 5 years, 2 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 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 <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 gfx::BufferUsage usage, 58 gfx::BufferUsage usage,
59 base::ProcessHandle child_process_handle, 59 base::ProcessHandle child_process_handle,
60 int child_client_id, 60 int child_client_id,
61 const AllocationCallback& callback); 61 const AllocationCallback& callback);
62 void ChildProcessDeletedGpuMemoryBuffer( 62 void ChildProcessDeletedGpuMemoryBuffer(
63 gfx::GpuMemoryBufferId id, 63 gfx::GpuMemoryBufferId id,
64 base::ProcessHandle child_process_handle, 64 base::ProcessHandle child_process_handle,
65 int child_client_id, 65 int child_client_id,
66 uint32 sync_point); 66 uint32 sync_point);
67 void ProcessRemoved(base::ProcessHandle process_handle, int client_id); 67 void ProcessRemoved(base::ProcessHandle process_handle, int client_id);
68 68 bool IsGpuMemoryBufferConfigurationSupported(gfx::BufferFormat format,
69 gfx::BufferUsage usage) const;
69 private: 70 private:
70 struct BufferInfo { 71 struct BufferInfo {
71 BufferInfo() 72 BufferInfo()
72 : type(gfx::EMPTY_BUFFER), 73 : type(gfx::EMPTY_BUFFER),
73 format(gfx::BufferFormat::RGBA_8888), 74 format(gfx::BufferFormat::RGBA_8888),
74 usage(gfx::BufferUsage::MAP), 75 usage(gfx::BufferUsage::MAP),
75 gpu_host_id(0) {} 76 gpu_host_id(0) {}
76 BufferInfo(const gfx::Size& size, 77 BufferInfo(const gfx::Size& size,
77 gfx::GpuMemoryBufferType type, 78 gfx::GpuMemoryBufferType type,
78 gfx::BufferFormat format, 79 gfx::BufferFormat format,
(...skipping 11 matching lines...) Expand all
90 gfx::BufferUsage usage; 91 gfx::BufferUsage usage;
91 int gpu_host_id; 92 int gpu_host_id;
92 }; 93 };
93 struct AllocateGpuMemoryBufferRequest; 94 struct AllocateGpuMemoryBufferRequest;
94 95
95 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForSurface( 96 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForSurface(
96 const gfx::Size& size, 97 const gfx::Size& size,
97 gfx::BufferFormat format, 98 gfx::BufferFormat format,
98 gfx::BufferUsage usage, 99 gfx::BufferUsage usage,
99 int32 surface_id); 100 int32 surface_id);
100 bool IsGpuMemoryBufferConfigurationSupported(gfx::BufferFormat format,
101 gfx::BufferUsage usage) const;
102 void AllocateGpuMemoryBufferForSurfaceOnIO( 101 void AllocateGpuMemoryBufferForSurfaceOnIO(
103 AllocateGpuMemoryBufferRequest* request); 102 AllocateGpuMemoryBufferRequest* request);
104 void GpuMemoryBufferAllocatedForSurfaceOnIO( 103 void GpuMemoryBufferAllocatedForSurfaceOnIO(
105 AllocateGpuMemoryBufferRequest* request, 104 AllocateGpuMemoryBufferRequest* request,
106 const gfx::GpuMemoryBufferHandle& handle); 105 const gfx::GpuMemoryBufferHandle& handle);
107 void AllocateGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, 106 void AllocateGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id,
108 const gfx::Size& size, 107 const gfx::Size& size,
109 gfx::BufferFormat format, 108 gfx::BufferFormat format,
110 gfx::BufferUsage usage, 109 gfx::BufferUsage usage,
111 int client_id, 110 int client_id,
(...skipping 27 matching lines...) Expand all
139 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; 138 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>;
140 using ClientMap = base::hash_map<int, BufferMap>; 139 using ClientMap = base::hash_map<int, BufferMap>;
141 ClientMap clients_; 140 ClientMap clients_;
142 141
143 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); 142 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager);
144 }; 143 };
145 144
146 } // namespace content 145 } // namespace content
147 146
148 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 147 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/gpu/compositor_util.h » ('j') | content/browser/gpu/compositor_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698