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

Unified Diff: ui/ozone/platform/drm/gpu/gbm_buffer.h

Issue 1381133002: ozone: Implement support for CreateGpuMemoryBufferFromHandle for OzoneNativePixmap backed GMBs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gmb-factory-create-from-handle
Patch Set: fixed fd ownership errors Created 5 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 side-by-side diff with in-line comments
Download patch
Index: ui/ozone/platform/drm/gpu/gbm_buffer.h
diff --git a/ui/ozone/platform/drm/gpu/gbm_buffer.h b/ui/ozone/platform/drm/gpu/gbm_buffer.h
index 0c426d7551c5205dfc4eb02495dfd176b3556dfd..4c2f242d314d9d1dd6f90fb26e721d6db83bb8c3 100644
--- a/ui/ozone/platform/drm/gpu/gbm_buffer.h
+++ b/ui/ozone/platform/drm/gpu/gbm_buffer.h
@@ -41,9 +41,9 @@ class GbmBuffer : public GbmBufferBase {
class GbmPixmap : public NativePixmap {
public:
- GbmPixmap(const scoped_refptr<GbmBuffer>& buffer,
- GbmSurfaceFactory* surface_manager);
- bool Initialize();
+ explicit GbmPixmap(GbmSurfaceFactory* surface_manager);
+ void Initialize(int dma_buf, int dma_buf_pitch);
spang 2015/10/09 17:29:21 I think we should use ScopedFD instead of int here
reveman 2015/10/09 18:45:32 Done. I also included the GbmPixmap::dma_buf_ chan
+ bool InitializeFromBuffer(const scoped_refptr<GbmBuffer>& buffer);
void SetScalingCallback(const ScalingCallback& scaling_callback) override;
scoped_refptr<NativePixmap> GetScaledPixmap(gfx::Size new_size) override;
@@ -68,6 +68,7 @@ class GbmPixmap : public NativePixmap {
scoped_refptr<GbmBuffer> buffer_;
int dma_buf_ = -1;
+ int dma_buf_pitch_ = -1;
GbmSurfaceFactory* surface_manager_;
« no previous file with comments | « content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap_unittest.cc ('k') | ui/ozone/platform/drm/gpu/gbm_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698