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

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

Issue 2148983002: gpu: Take surface handle into account when importing buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: avoid crash in DrmDeviceManager::GetDrmDevice when passed invalid widget 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_SURFACE_TEXTURE_H_ 5 #ifndef GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_
6 #define GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ 6 #define GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 30 matching lines...) Expand all
41 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, 41 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
42 int client_id) override; 42 int client_id) override;
43 ImageFactory* AsImageFactory() override; 43 ImageFactory* AsImageFactory() override;
44 44
45 // Overridden from ImageFactory: 45 // Overridden from ImageFactory:
46 scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer( 46 scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer(
47 const gfx::GpuMemoryBufferHandle& handle, 47 const gfx::GpuMemoryBufferHandle& handle,
48 const gfx::Size& size, 48 const gfx::Size& size,
49 gfx::BufferFormat format, 49 gfx::BufferFormat format,
50 unsigned internalformat, 50 unsigned internalformat,
51 int client_id) override; 51 int client_id,
52 SurfaceHandle surface_handle) override;
52 53
53 private: 54 private:
54 typedef std::pair<int, int> SurfaceTextureMapKey; 55 typedef std::pair<int, int> SurfaceTextureMapKey;
55 typedef base::hash_map<SurfaceTextureMapKey, 56 typedef base::hash_map<SurfaceTextureMapKey,
56 scoped_refptr<gl::SurfaceTexture>> 57 scoped_refptr<gl::SurfaceTexture>>
57 SurfaceTextureMap; 58 SurfaceTextureMap;
58 SurfaceTextureMap surface_textures_; 59 SurfaceTextureMap surface_textures_;
59 base::Lock surface_textures_lock_; 60 base::Lock surface_textures_lock_;
60 }; 61 };
61 62
62 } // namespace gpu 63 } // namespace gpu
63 64
64 #endif // GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ 65 #endif // GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698