Index: content/browser/compositor/buffer_queue.cc |
diff --git a/content/browser/compositor/buffer_queue.cc b/content/browser/compositor/buffer_queue.cc |
index 689288f6d63b75d10c0b329fb32205d234ee1140..4b49330519aa4bc5a0cb4e0ab59b528792ab5981 100644 |
--- a/content/browser/compositor/buffer_queue.cc |
+++ b/content/browser/compositor/buffer_queue.cc |
@@ -4,6 +4,7 @@ |
#include "content/browser/compositor/buffer_queue.h" |
+#include "base/memory/scoped_vector.h" |
reveman
2015/03/12 19:37:22
I don't think you use this anymore.
emircan
2015/03/12 22:34:26
Right. Sorry for missing that.
|
#include "content/browser/compositor/image_transport_factory.h" |
#include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
#include "content/common/gpu/client/context_provider_command_buffer.h" |
@@ -166,11 +167,14 @@ BufferQueue::AllocatedSurface BufferQueue::GetNextSurface() { |
// We don't want to allow anything more than triple buffering. |
DCHECK_LT(allocated_count_, 4U); |
+ DCHECK_EQ( |
+ gpu::ImageFactory::GpuMemoryBufferCountForImageFormat(internalformat_), |
+ 1); |
scoped_ptr<gfx::GpuMemoryBuffer> buffer( |
gpu_memory_buffer_manager_->AllocateGpuMemoryBufferForScanout( |
size_, gpu::ImageFactory::ImageFormatToGpuMemoryBufferFormat( |
- internalformat_), |
+ internalformat_, 0), |
surface_id_)); |
if (!buffer) { |
gl->DeleteTextures(1, &texture); |
@@ -178,8 +182,9 @@ BufferQueue::AllocatedSurface BufferQueue::GetNextSurface() { |
return AllocatedSurface(); |
} |
- unsigned int id = gl->CreateImageCHROMIUM( |
- buffer->AsClientBuffer(), size_.width(), size_.height(), internalformat_); |
+ ClientBuffer client_buffers[] = {buffer->AsClientBuffer()}; |
+ unsigned int id = gl->CreateImageCHROMIUM(client_buffers, size_.width(), |
+ size_.height(), internalformat_); |
if (!id) { |
LOG(ERROR) << "Failed to allocate backing image surface"; |