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

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

Issue 177953004: Enable SurfaceTexture based zero-copy texture uploading on Android platform Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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_android.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_android.cc b/content/common/gpu/client/gpu_memory_buffer_impl_android.cc
index ffd4e381c7d9276e27d51e5c9d027ecca96dd33c..8c19920bb5ec3bfc59769504fbd2369b408dc2c1 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_android.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_android.cc
@@ -3,8 +3,8 @@
// found in the LICENSE file.
#include "content/common/gpu/client/gpu_memory_buffer_impl.h"
-
#include "content/common/gpu/client/gpu_memory_buffer_impl_shm.h"
+#include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h"
namespace content {
@@ -21,6 +21,14 @@ scoped_ptr<GpuMemoryBufferImpl> GpuMemoryBufferImpl::Create(
return buffer.PassAs<GpuMemoryBufferImpl>();
}
+ case gfx::SURFACE_TEXTURE_BUFFER: {
+ scoped_ptr<GpuMemoryBufferImplSurfaceTexture> buffer(
+ new GpuMemoryBufferImplSurfaceTexture(size, internalformat));
+ if (!buffer->Initialize(handle))
+ return scoped_ptr<GpuMemoryBufferImpl>();
+
+ return buffer.PassAs<GpuMemoryBufferImpl>();
+ }
default:
return scoped_ptr<GpuMemoryBufferImpl>();
}

Powered by Google App Engine
This is Rietveld 408576698