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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl_win.cc

Issue 540443002: Enable sync allocation of GpuMemoryBuffers from the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: content/common/gpu/client/gpu_memory_buffer_impl_win.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_win.cc b/content/common/gpu/client/gpu_memory_buffer_impl_win.cc
index 5c04cd8d9b18f94824c27e0eff5e3d2246866439..6468525eb46958580b73a0d245a79a0b89ff6a94 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_win.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_win.cc
@@ -9,21 +9,18 @@
namespace content {
// static
-scoped_ptr<GpuMemoryBufferImpl> GpuMemoryBufferImpl::Create(
- const gfx::Size& size,
- unsigned internalformat,
- unsigned usage) {
+void GpuMemoryBufferImpl::Create(const gfx::Size& size,
+ unsigned internalformat,
+ unsigned usage,
+ const CreationCallback& callback) {
if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
size, internalformat, usage)) {
- scoped_ptr<GpuMemoryBufferImplSharedMemory> buffer(
- new GpuMemoryBufferImplSharedMemory(size, internalformat));
- if (!buffer->Initialize())
- return scoped_ptr<GpuMemoryBufferImpl>();
-
- return buffer.PassAs<GpuMemoryBufferImpl>();
+ GpuMemoryBufferImplSharedMemory::Create(
+ size, internalformat, usage, callback);
+ return;
}
- return scoped_ptr<GpuMemoryBufferImpl>();
+ callback.Run(scoped_ptr<GpuMemoryBufferImpl>());
}
// static
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc ('k') | content/common/gpu/gpu_channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698