OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/common/gpu/gpu_memory_buffer_factory_io_surface.h" | 5 #include "content/common/gpu/gpu_memory_buffer_factory_io_surface.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" | |
11 #include "ui/gfx/buffer_format_util.h" | 10 #include "ui/gfx/buffer_format_util.h" |
12 #include "ui/gfx/mac/io_surface.h" | 11 #include "ui/gfx/mac/io_surface.h" |
13 #include "ui/gl/gl_image_io_surface.h" | 12 #include "ui/gl/gl_image_io_surface.h" |
14 | 13 |
15 namespace content { | 14 namespace content { |
16 | 15 |
17 GpuMemoryBufferFactoryIOSurface::GpuMemoryBufferFactoryIOSurface() { | 16 GpuMemoryBufferFactoryIOSurface::GpuMemoryBufferFactoryIOSurface() { |
18 } | 17 } |
19 | 18 |
20 GpuMemoryBufferFactoryIOSurface::~GpuMemoryBufferFactoryIOSurface() { | 19 GpuMemoryBufferFactoryIOSurface::~GpuMemoryBufferFactoryIOSurface() { |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 111 |
113 scoped_refptr<gl::GLImageIOSurface> image( | 112 scoped_refptr<gl::GLImageIOSurface> image( |
114 new gl::GLImageIOSurface(size, internalformat)); | 113 new gl::GLImageIOSurface(size, internalformat)); |
115 if (!image->Initialize(it->second.get(), handle.id, format)) | 114 if (!image->Initialize(it->second.get(), handle.id, format)) |
116 return scoped_refptr<gl::GLImage>(); | 115 return scoped_refptr<gl::GLImage>(); |
117 | 116 |
118 return image; | 117 return image; |
119 } | 118 } |
120 | 119 |
121 } // namespace content | 120 } // namespace content |
OLD | NEW |