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

Unified Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.h

Issue 2811513002: gpu: Simplify the error handling during gpu memory buffer allocation. (Closed)
Patch Set: tot merge Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/browser_gpu_memory_buffer_manager.h
diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.h b/content/browser/gpu/browser_gpu_memory_buffer_manager.h
index ef999ca4098af42e293926c448a75822d4b92e6f..a6468d77b827a368a8f732b84c6e4b0425ea0dd0 100644
--- a/content/browser/gpu/browser_gpu_memory_buffer_manager.h
+++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.h
@@ -16,13 +16,13 @@
#include "base/hash.h"
#include "base/macros.h"
#include "base/trace_event/memory_dump_provider.h"
+#include "content/browser/gpu/gpu_process_host.h"
#include "content/common/content_export.h"
#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
#include "gpu/ipc/common/surface_handle.h"
#include "gpu/ipc/host/gpu_memory_buffer_support.h"
namespace content {
-class GpuProcessHost;
class CONTENT_EXPORT BrowserGpuMemoryBufferManager
: public gpu::GpuMemoryBufferManager,
@@ -87,14 +87,6 @@ class CONTENT_EXPORT BrowserGpuMemoryBufferManager
struct CreateGpuMemoryBufferRequest;
- using CreateDelegate = base::Callback<void(GpuProcessHost* host,
- gfx::GpuMemoryBufferId id,
- const gfx::Size& size,
- gfx::BufferFormat format,
- gfx::BufferUsage usage,
- int client_id,
- const CreateCallback& callback)>;
-
std::unique_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBufferForSurface(
const gfx::Size& size,
gfx::BufferFormat format,
@@ -108,21 +100,20 @@ class CONTENT_EXPORT BrowserGpuMemoryBufferManager
const gfx::GpuMemoryBufferHandle& handle);
// Functions that implement asynchronous buffer creation.
- void CreateGpuMemoryBufferOnIO(const CreateDelegate& create_delegate,
- gfx::GpuMemoryBufferId id,
+ void CreateGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id,
const gfx::Size& size,
gfx::BufferFormat format,
gfx::BufferUsage usage,
+ gpu::SurfaceHandle surface_handle,
int client_id,
- bool reused_gpu_process,
const CreateCallback& callback);
- void GpuMemoryBufferCreatedOnIO(const CreateDelegate& create_delegate,
- gfx::GpuMemoryBufferId id,
+ void GpuMemoryBufferCreatedOnIO(gfx::GpuMemoryBufferId id,
+ gpu::SurfaceHandle surface_handle,
int client_id,
int gpu_host_id,
- bool reused_gpu_process,
const CreateCallback& callback,
- const gfx::GpuMemoryBufferHandle& handle);
+ const gfx::GpuMemoryBufferHandle& handle,
+ GpuProcessHost::BufferCreationStatus status);
void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id,
int client_id,
const gpu::SyncToken& sync_token);
@@ -133,9 +124,6 @@ class CONTENT_EXPORT BrowserGpuMemoryBufferManager
const int gpu_client_id_;
const uint64_t gpu_client_tracing_id_;
- // The GPU process host ID. This should only be accessed on the IO thread.
- int gpu_host_id_;
-
// Stores info about buffers for all clients. This should only be accessed
// on the IO thread.
using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>;
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698