| 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_PUBLIC_NATIVE_PIXMAP_H_ | 5 #ifndef UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ |
| 6 #define UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ | 6 #define UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // This represents a buffer that can be directly imported via GL for | 22 // This represents a buffer that can be directly imported via GL for |
| 23 // rendering, or exported via dma-buf fds. | 23 // rendering, or exported via dma-buf fds. |
| 24 class NativePixmap : public base::RefCountedThreadSafe<NativePixmap> { | 24 class NativePixmap : public base::RefCountedThreadSafe<NativePixmap> { |
| 25 public: | 25 public: |
| 26 NativePixmap() {} | 26 NativePixmap() {} |
| 27 | 27 |
| 28 virtual void* /* EGLClientBuffer */ GetEGLClientBuffer() const = 0; | 28 virtual void* /* EGLClientBuffer */ GetEGLClientBuffer() const = 0; |
| 29 virtual bool AreDmaBufFdsValid() const = 0; | 29 virtual bool AreDmaBufFdsValid() const = 0; |
| 30 virtual int GetDmaBufFd(size_t plane) const = 0; | 30 virtual int GetDmaBufFd(size_t plane) const = 0; |
| 31 virtual int GetDmaBufPitch(size_t plane) const = 0; | 31 virtual int GetDmaBufPitch(size_t plane) const = 0; |
| 32 virtual uint64_t GetDmaBufModifier(size_t plane) const = 0; |
| 32 virtual gfx::BufferFormat GetBufferFormat() const = 0; | 33 virtual gfx::BufferFormat GetBufferFormat() const = 0; |
| 33 virtual gfx::Size GetBufferSize() const = 0; | 34 virtual gfx::Size GetBufferSize() const = 0; |
| 34 | 35 |
| 35 // Sets the overlay plane to switch to at the next page flip. | 36 // Sets the overlay plane to switch to at the next page flip. |
| 36 // |w| specifies the screen to display this overlay plane on. | 37 // |w| specifies the screen to display this overlay plane on. |
| 37 // |plane_z_order| specifies the stacking order of the plane relative to the | 38 // |plane_z_order| specifies the stacking order of the plane relative to the |
| 38 // main framebuffer located at index 0. | 39 // main framebuffer located at index 0. |
| 39 // |plane_transform| specifies how the buffer is to be transformed during. | 40 // |plane_transform| specifies how the buffer is to be transformed during. |
| 40 // composition. | 41 // composition. |
| 41 // |buffer| to be presented by the overlay. | 42 // |buffer| to be presented by the overlay. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 69 | 70 |
| 70 private: | 71 private: |
| 71 friend class base::RefCountedThreadSafe<NativePixmap>; | 72 friend class base::RefCountedThreadSafe<NativePixmap>; |
| 72 | 73 |
| 73 DISALLOW_COPY_AND_ASSIGN(NativePixmap); | 74 DISALLOW_COPY_AND_ASSIGN(NativePixmap); |
| 74 }; | 75 }; |
| 75 | 76 |
| 76 } // namespace ui | 77 } // namespace ui |
| 77 | 78 |
| 78 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ | 79 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ |
| OLD | NEW |