projects
/
platform
/
framework
/
web
/
crosswalk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update To 11.40.268.0
[platform/framework/web/crosswalk.git]
/
src
/
content
/
common
/
gpu
/
gpu_memory_buffer_factory_io_surface.cc
diff --git
a/src/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
b/src/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
index
8c9fee5
..
182f826
100644
(file)
--- a/
src/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
+++ b/
src/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
@@
-37,9
+37,10
@@
GpuMemoryBufferFactoryIOSurface::~GpuMemoryBufferFactoryIOSurface() {
gfx::GpuMemoryBufferHandle
GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
gfx::GpuMemoryBufferHandle
GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
-
const gfx::GpuMemoryBufferId&
id,
+
gfx::GpuMemoryBufferId
id,
const gfx::Size& size,
const gfx::Size& size,
- unsigned internalformat) {
+ gfx::GpuMemoryBuffer::Format format,
+ int client_id) {
base::ScopedCFTypeRef<CFMutableDictionaryRef> properties;
properties.reset(CFDictionaryCreateMutable(kCFAllocatorDefault,
0,
base::ScopedCFTypeRef<CFMutableDictionaryRef> properties;
properties.reset(CFDictionaryCreateMutable(kCFAllocatorDefault,
0,
@@
-49,10
+50,10
@@
GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
AddIntegerValue(properties, kIOSurfaceHeight, size.height());
AddIntegerValue(properties,
kIOSurfaceBytesPerElement,
AddIntegerValue(properties, kIOSurfaceHeight, size.height());
AddIntegerValue(properties,
kIOSurfaceBytesPerElement,
- GpuMemoryBufferImpl::BytesPerPixel(
internal
format));
+ GpuMemoryBufferImpl::BytesPerPixel(format));
AddIntegerValue(properties,
kIOSurfacePixelFormat,
AddIntegerValue(properties,
kIOSurfacePixelFormat,
- GpuMemoryBufferImplIOSurface::PixelFormat(
internal
format));
+ 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);
// 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);
@@
-61,20
+62,21
@@
GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
if (!io_surface)
return gfx::GpuMemoryBufferHandle();
if (!io_surface)
return gfx::GpuMemoryBufferHandle();
- IOSurfaceMapKey key(id
.primary_id, id.secondary
_id);
+ IOSurfaceMapKey key(id
, client
_id);
DCHECK(io_surfaces_.find(key) == io_surfaces_.end());
io_surfaces_[key] = io_surface;
gfx::GpuMemoryBufferHandle handle;
handle.type = gfx::IO_SURFACE_BUFFER;
DCHECK(io_surfaces_.find(key) == io_surfaces_.end());
io_surfaces_[key] = io_surface;
gfx::GpuMemoryBufferHandle handle;
handle.type = gfx::IO_SURFACE_BUFFER;
- handle.
global_
id = id;
+ handle.id = id;
handle.io_surface_id = IOSurfaceGetID(io_surface);
return handle;
}
void GpuMemoryBufferFactoryIOSurface::DestroyGpuMemoryBuffer(
handle.io_surface_id = IOSurfaceGetID(io_surface);
return handle;
}
void GpuMemoryBufferFactoryIOSurface::DestroyGpuMemoryBuffer(
- const gfx::GpuMemoryBufferId& id) {
- IOSurfaceMapKey key(id.primary_id, id.secondary_id);
+ gfx::GpuMemoryBufferId id,
+ int client_id) {
+ IOSurfaceMapKey key(id, client_id);
IOSurfaceMap::iterator it = io_surfaces_.find(key);
if (it != io_surfaces_.end())
io_surfaces_.erase(it);
IOSurfaceMap::iterator it = io_surfaces_.find(key);
if (it != io_surfaces_.end())
io_surfaces_.erase(it);
@@
-82,10
+84,11
@@
void GpuMemoryBufferFactoryIOSurface::DestroyGpuMemoryBuffer(
scoped_refptr<gfx::GLImage>
GpuMemoryBufferFactoryIOSurface::CreateImageForGpuMemoryBuffer(
scoped_refptr<gfx::GLImage>
GpuMemoryBufferFactoryIOSurface::CreateImageForGpuMemoryBuffer(
-
const gfx::GpuMemoryBufferId&
id,
+
gfx::GpuMemoryBufferId
id,
const gfx::Size& size,
const gfx::Size& size,
- unsigned internalformat) {
- IOSurfaceMapKey key(id.primary_id, id.secondary_id);
+ gfx::GpuMemoryBuffer::Format format,
+ int client_id) {
+ IOSurfaceMapKey key(id, client_id);
IOSurfaceMap::iterator it = io_surfaces_.find(key);
if (it == io_surfaces_.end())
return scoped_refptr<gfx::GLImage>();
IOSurfaceMap::iterator it = io_surfaces_.find(key);
if (it == io_surfaces_.end())
return scoped_refptr<gfx::GLImage>();