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

Unified Diff: content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h

Issue 1258713002: ozone: unify GpuMemoryBufferFactoryOzoneNativePixmap in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix linux_chromium_gn_dgb build Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h
diff --git a/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h b/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h
index 3e84cebebc19ab3bc1f156d17808430edb766209..94a9b170ce6d3e1570f69f0709f377f1fcf581d1 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h
+++ b/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h
@@ -5,12 +5,11 @@
#ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_OZONE_NATIVE_PIXMAP_H_
#define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_OZONE_NATIVE_PIXMAP_H_
-#include "base/memory/ref_counted.h"
+#include "base/containers/hash_tables.h"
+#include "base/synchronization/lock.h"
#include "content/common/gpu/gpu_memory_buffer_factory.h"
#include "gpu/command_buffer/service/image_factory.h"
-#include "ui/gfx/geometry/size.h"
-#include "ui/gfx/gpu_memory_buffer.h"
-#include "ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h"
+#include "ui/ozone/public/native_pixmap.h"
namespace gfx {
class GLImage;
@@ -51,7 +50,11 @@ class GpuMemoryBufferFactoryOzoneNativePixmap : public GpuMemoryBufferFactory,
int client_id) override;
private:
- ui::GpuMemoryBufferFactoryOzoneNativePixmap ozone_native_pixmap_factory_;
+ using NativePixmapMapKey = std::pair<int, int>;
+ using NativePixmapMap =
+ base::hash_map<NativePixmapMapKey, scoped_refptr<ui::NativePixmap>>;
+ NativePixmapMap native_pixmaps_;
+ base::Lock native_pixmaps_lock_;
DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactoryOzoneNativePixmap);
};
« no previous file with comments | « no previous file | content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698