Index: gpu/ipc/service/gpu_memory_buffer_factory_ozone_native_pixmap.h |
diff --git a/gpu/ipc/service/gpu_memory_buffer_factory_ozone_native_pixmap.h b/gpu/ipc/service/gpu_memory_buffer_factory_ozone_native_pixmap.h |
index b981a9676ca3730d8f61c4dbe88daaff93ba191d..5a132bbdaeb4ac839d8eca08362c430a067e11f8 100644 |
--- a/gpu/ipc/service/gpu_memory_buffer_factory_ozone_native_pixmap.h |
+++ b/gpu/ipc/service/gpu_memory_buffer_factory_ozone_native_pixmap.h |
@@ -5,6 +5,10 @@ |
#ifndef GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_OZONE_NATIVE_PIXMAP_H_ |
#define GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_OZONE_NATIVE_PIXMAP_H_ |
+#include <unordered_map> |
+#include <utility> |
+ |
+#include "base/hash.h" |
#include "base/macros.h" |
#include "base/synchronization/lock.h" |
#include "gpu/command_buffer/service/image_factory.h" |
@@ -34,7 +38,7 @@ class GPU_EXPORT GpuMemoryBufferFactoryOzoneNativePixmap |
int client_id, |
SurfaceHandle surface_handle) override; |
void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, |
- int client_id) override {} |
+ int client_id) override; |
ImageFactory* AsImageFactory() override; |
// Overridden from ImageFactory: |
@@ -47,6 +51,15 @@ class GPU_EXPORT GpuMemoryBufferFactoryOzoneNativePixmap |
SurfaceHandle surface_handle) override; |
private: |
+ using NativePixmapMapKey = std::pair<int, int>; |
+ using NativePixmapMapKeyHash = base::IntPairHash<NativePixmapMapKey>; |
+ using NativePixmapMap = |
+ std::unordered_map<NativePixmapMapKey, |
+ scoped_refptr<ui::NativePixmap>, |
+ NativePixmapMapKeyHash>; |
+ NativePixmapMap native_pixmaps_; |
+ base::Lock native_pixmaps_lock_; |
+ |
DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactoryOzoneNativePixmap); |
}; |