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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 255713008: Change glimage to accept a type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no ozone Created 6 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
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 58407c89bb110256ad7b1405ceeb5ff3aae4d5d7..f4e389b9d38a58c7b993a916988788608fe80d43 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1134,7 +1134,8 @@ void RenderThreadImpl::DeleteImage(int32 image_id, int32 sync_point) {
scoped_ptr<gfx::GpuMemoryBuffer> RenderThreadImpl::AllocateGpuMemoryBuffer(
size_t width,
size_t height,
- unsigned internalformat) {
+ unsigned internalformat,
+ gfx::GpuMemoryBuffer::Usage usage) {
DCHECK(allocate_gpu_memory_buffer_thread_checker_.CalledOnValidThread());
if (!GpuMemoryBufferImpl::IsFormatValid(internalformat))
@@ -1142,11 +1143,8 @@ scoped_ptr<gfx::GpuMemoryBuffer> RenderThreadImpl::AllocateGpuMemoryBuffer(
gfx::GpuMemoryBufferHandle handle;
bool success;
- IPC::Message* message =
- new ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer(width,
- height,
- internalformat,
- &handle);
+ IPC::Message* message = new ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer(
+ width, height, internalformat, usage, &handle);
// Allow calling this from the compositor thread.
if (base::MessageLoop::current() == message_loop())
@@ -1158,9 +1156,8 @@ scoped_ptr<gfx::GpuMemoryBuffer> RenderThreadImpl::AllocateGpuMemoryBuffer(
return scoped_ptr<gfx::GpuMemoryBuffer>();
return GpuMemoryBufferImpl::Create(
- handle,
- gfx::Size(width, height),
- internalformat).PassAs<gfx::GpuMemoryBuffer>();
+ handle, gfx::Size(width, height), internalformat, usage)
+ .PassAs<gfx::GpuMemoryBuffer>();
}
void RenderThreadImpl::AcceptConnection(

Powered by Google App Engine
This is Rietveld 408576698