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

Side by Side Diff: content/common/gpu/gpu_memory_buffer_factory_io_surface.h

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 unified diff | Download patch
OLDNEW
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 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_
6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_ 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_
7 7
8 #include <IOSurface/IOSurfaceAPI.h> 8 #include <IOSurface/IOSurfaceAPI.h>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 11 matching lines...) Expand all
22 class GpuMemoryBufferFactoryIOSurface { 22 class GpuMemoryBufferFactoryIOSurface {
23 public: 23 public:
24 GpuMemoryBufferFactoryIOSurface(); 24 GpuMemoryBufferFactoryIOSurface();
25 ~GpuMemoryBufferFactoryIOSurface(); 25 ~GpuMemoryBufferFactoryIOSurface();
26 26
27 // Creates a IOSurface backed GPU memory buffer with |size| and 27 // Creates a IOSurface backed GPU memory buffer with |size| and
28 // |internalformat|. A valid handle is returned on success. 28 // |internalformat|. A valid handle is returned on success.
29 gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer( 29 gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer(
30 const gfx::GpuMemoryBufferId& id, 30 const gfx::GpuMemoryBufferId& id,
31 const gfx::Size& size, 31 const gfx::Size& size,
32 unsigned internalformat); 32 gfx::GpuMemoryBuffer::Format format);
33 33
34 // Destroy a previously created GPU memory buffer. 34 // Destroy a previously created GPU memory buffer.
35 void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferId& id); 35 void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferId& id);
36 36
37 // Creates a GLImage instance for a GPU memory buffer. 37 // Creates a GLImage instance for a GPU memory buffer.
38 scoped_refptr<gfx::GLImage> CreateImageForGpuMemoryBuffer( 38 scoped_refptr<gfx::GLImage> CreateImageForGpuMemoryBuffer(
39 const gfx::GpuMemoryBufferId& id, 39 const gfx::GpuMemoryBufferId& id,
40 const gfx::Size& size, 40 const gfx::Size& size,
41 unsigned internalformat); 41 gfx::GpuMemoryBuffer::Format format);
42 42
43 private: 43 private:
44 typedef std::pair<int, int> IOSurfaceMapKey; 44 typedef std::pair<int, int> IOSurfaceMapKey;
45 typedef base::hash_map<IOSurfaceMapKey, base::ScopedCFTypeRef<IOSurfaceRef>> 45 typedef base::hash_map<IOSurfaceMapKey, base::ScopedCFTypeRef<IOSurfaceRef>>
46 IOSurfaceMap; 46 IOSurfaceMap;
47 IOSurfaceMap io_surfaces_; 47 IOSurfaceMap io_surfaces_;
48 }; 48 };
49 49
50 } // namespace content 50 } // namespace content
51 51
52 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_ 52 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_memory_buffer_factory_android.cc ('k') | content/common/gpu/gpu_memory_buffer_factory_io_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698