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

Unified Diff: content/common/gpu/gpu_memory_buffer_factory_io_surface.cc

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: mac build fix Created 6 years, 2 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/gpu_memory_buffer_factory_io_surface.cc
diff --git a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
index 8c9fee5cfb210d0a6a2a2765051161405f01b796..b9170b412ff8ac3cd83f5a30fc1c5395b1baaba5 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
+++ b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
@@ -39,7 +39,7 @@ gfx::GpuMemoryBufferHandle
GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
const gfx::GpuMemoryBufferId& id,
const gfx::Size& size,
- unsigned internalformat) {
+ gfx::GpuMemoryBuffer::Format format) {
base::ScopedCFTypeRef<CFMutableDictionaryRef> properties;
properties.reset(CFDictionaryCreateMutable(kCFAllocatorDefault,
0,
@@ -84,14 +84,14 @@ scoped_refptr<gfx::GLImage>
GpuMemoryBufferFactoryIOSurface::CreateImageForGpuMemoryBuffer(
const gfx::GpuMemoryBufferId& id,
const gfx::Size& size,
- unsigned internalformat) {
+ gfx::GpuMemoryBuffer::Format format) {
IOSurfaceMapKey key(id.primary_id, id.secondary_id);
IOSurfaceMap::iterator it = io_surfaces_.find(key);
if (it == io_surfaces_.end())
return scoped_refptr<gfx::GLImage>();
scoped_refptr<gfx::GLImageIOSurface> image(new gfx::GLImageIOSurface(size));
- if (!image->Initialize(it->second.get()))
+ if (!image->Initialize(it->second.get(), format))
return scoped_refptr<gfx::GLImage>();
return image;

Powered by Google App Engine
This is Rietveld 408576698