| OLD | NEW |
| 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 UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 class GbmPixmap : public NativePixmap { | 36 class GbmPixmap : public NativePixmap { |
| 37 public: | 37 public: |
| 38 GbmPixmap(const scoped_refptr<GbmBuffer>& buffer); | 38 GbmPixmap(const scoped_refptr<GbmBuffer>& buffer); |
| 39 bool Initialize(); | 39 bool Initialize(); |
| 40 | 40 |
| 41 // NativePixmap: | 41 // NativePixmap: |
| 42 void* GetEGLClientBuffer() override; | 42 void* GetEGLClientBuffer() override; |
| 43 int GetDmaBufFd() override; | 43 int GetDmaBufFd() override; |
| 44 int GetDmaBufPitch() override; | 44 int GetDmaBufPitch() override; |
| 45 BufferUsage GetBufferUsage() const override; |
| 46 void* Map() override; |
| 47 void Unmap() override; |
| 45 | 48 |
| 46 scoped_refptr<GbmBuffer> buffer() { return buffer_; } | 49 scoped_refptr<GbmBuffer> buffer() { return buffer_; } |
| 47 | 50 |
| 48 private: | 51 private: |
| 49 ~GbmPixmap() override; | 52 ~GbmPixmap() override; |
| 50 | 53 |
| 51 scoped_refptr<GbmBuffer> buffer_; | 54 scoped_refptr<GbmBuffer> buffer_; |
| 52 int dma_buf_ = -1; | 55 int dma_buf_ = -1; |
| 53 | 56 |
| 54 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); | 57 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); |
| 55 }; | 58 }; |
| 56 | 59 |
| 57 } // namespace ui | 60 } // namespace ui |
| 58 | 61 |
| 59 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 62 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
| OLD | NEW |