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

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: rebase 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..1e159a3a6fe21637ac02e5d0280f28dee2f3e085 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,
@@ -49,10 +49,10 @@ GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
AddIntegerValue(properties, kIOSurfaceHeight, size.height());
AddIntegerValue(properties,
kIOSurfaceBytesPerElement,
- GpuMemoryBufferImpl::BytesPerPixel(internalformat));
+ GpuMemoryBufferImpl::BytesPerPixel(format));
AddIntegerValue(properties,
kIOSurfacePixelFormat,
- GpuMemoryBufferImplIOSurface::PixelFormat(internalformat));
+ GpuMemoryBufferImplIOSurface::PixelFormat(format));
// TODO(reveman): Remove this when using a mach_port_t to transfer
// IOSurface to browser and renderer process. crbug.com/323304
AddBooleanValue(properties, kIOSurfaceIsGlobal, true);
@@ -84,7 +84,7 @@ 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())
« no previous file with comments | « content/common/gpu/gpu_memory_buffer_factory_io_surface.h ('k') | content/common/gpu/gpu_memory_buffer_factory_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698