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

Unified Diff: content/browser/compositor/buffer_queue.cc

Issue 962723002: Change CHROMIUM_image declarations to support multi planar input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reveman@ comments. Created 5 years, 9 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/browser/compositor/buffer_queue.cc
diff --git a/content/browser/compositor/buffer_queue.cc b/content/browser/compositor/buffer_queue.cc
index 689288f6d63b75d10c0b329fb32205d234ee1140..7c2fa010a87517e74e5e01ff628e4719ac65c278 100644
--- a/content/browser/compositor/buffer_queue.cc
+++ b/content/browser/compositor/buffer_queue.cc
@@ -166,11 +166,13 @@ BufferQueue::AllocatedSurface BufferQueue::GetNextSurface() {
// We don't want to allow anything more than triple buffering.
DCHECK_LT(allocated_count_, 4U);
+ DCHECK_EQ(gpu::ImageFactory::NumberOfPlanesForImageFormat(internalformat_),
+ 1u);
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 +180,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";

Powered by Google App Engine
This is Rietveld 408576698