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

Side by Side Diff: gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h

Issue 2061743004: Implement native GMB backbuffers in the GLES2 Command Decoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from piman. Created 4 years, 5 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 GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_ 5 #ifndef GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_
6 #define GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_ 6 #define GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include <IOSurface/IOSurface.h> 10 #include <IOSurface/IOSurface.h>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 int client_id) override; 46 int client_id) override;
47 ImageFactory* AsImageFactory() override; 47 ImageFactory* AsImageFactory() override;
48 48
49 // Overridden from ImageFactory: 49 // Overridden from ImageFactory:
50 scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer( 50 scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer(
51 const gfx::GpuMemoryBufferHandle& handle, 51 const gfx::GpuMemoryBufferHandle& handle,
52 const gfx::Size& size, 52 const gfx::Size& size,
53 gfx::BufferFormat format, 53 gfx::BufferFormat format,
54 unsigned internalformat, 54 unsigned internalformat,
55 int client_id) override; 55 int client_id) override;
56 scoped_refptr<gl::GLImage> CreateAnonymousImage(
57 const gfx::Size& size,
58 gfx::BufferFormat format,
59 unsigned internalformat) override;
60 unsigned RequiredTextureType() override;
61 bool SupportsFormatRGB() override;
56 62
57 private: 63 private:
58 typedef std::pair<gfx::IOSurfaceId, int> IOSurfaceMapKey; 64 typedef std::pair<gfx::IOSurfaceId, int> IOSurfaceMapKey;
59 typedef base::hash_map<IOSurfaceMapKey, base::ScopedCFTypeRef<IOSurfaceRef>> 65 typedef base::hash_map<IOSurfaceMapKey, base::ScopedCFTypeRef<IOSurfaceRef>>
60 IOSurfaceMap; 66 IOSurfaceMap;
61 // TOOD(reveman): Remove |io_surfaces_| and allow IOSurface backed GMBs to be 67 // TOOD(reveman): Remove |io_surfaces_| and allow IOSurface backed GMBs to be
62 // used with any GPU process by passing a mach_port to CreateImageCHROMIUM. 68 // used with any GPU process by passing a mach_port to CreateImageCHROMIUM.
63 IOSurfaceMap io_surfaces_; 69 IOSurfaceMap io_surfaces_;
64 base::Lock io_surfaces_lock_; 70 base::Lock io_surfaces_lock_;
65 71
66 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactoryIOSurface); 72 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactoryIOSurface);
67 }; 73 };
68 74
69 } // namespace gpu 75 } // namespace gpu
70 76
71 #endif // GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_ 77 #endif // GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_command_buffer_stub.cc ('k') | gpu/ipc/service/gpu_memory_buffer_factory_io_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698