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

Side by Side Diff: ui/ozone/public/native_pixmap.h

Issue 2055483002: gl: Add YVU_420 support to GLImageOzoneNativePixmap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make cast compile. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
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"
11 #include "ui/gfx/native_pixmap_handle_ozone.h" 11 #include "ui/gfx/native_pixmap_handle_ozone.h"
12 #include "ui/gfx/native_widget_types.h" 12 #include "ui/gfx/native_widget_types.h"
13 #include "ui/gfx/overlay_transform.h" 13 #include "ui/gfx/overlay_transform.h"
14 14
15 namespace gfx { 15 namespace gfx {
16 class Rect; 16 class Rect;
17 class RectF; 17 class RectF;
18 } 18 }
19 19
20 namespace ui { 20 namespace ui {
21 21
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 size_t GetDmaBufFdNum() const = 0;
dnicoara 2016/06/09 01:17:02 nit: Not sure how others feel, but I was a bit con
Daniele Castagna 2016/06/09 01:27:58 Count seems better. Done.
30 virtual int GetDmaBufFd(size_t plane) const = 0; 31 virtual int GetDmaBufFd(size_t plane) const = 0;
31 virtual int GetDmaBufPitch(size_t plane) const = 0; 32 virtual int GetDmaBufPitch(size_t plane) const = 0;
32 virtual int GetDmaBufOffset(size_t plane) const = 0; 33 virtual int GetDmaBufOffset(size_t plane) const = 0;
33 virtual gfx::BufferFormat GetBufferFormat() const = 0; 34 virtual gfx::BufferFormat GetBufferFormat() const = 0;
34 virtual gfx::Size GetBufferSize() const = 0; 35 virtual gfx::Size GetBufferSize() const = 0;
35 36
36 // Sets the overlay plane to switch to at the next page flip. 37 // Sets the overlay plane to switch to at the next page flip.
37 // |w| specifies the screen to display this overlay plane on. 38 // |w| specifies the screen to display this overlay plane on.
38 // |plane_z_order| specifies the stacking order of the plane relative to the 39 // |plane_z_order| specifies the stacking order of the plane relative to the
39 // main framebuffer located at index 0. 40 // main framebuffer located at index 0.
(...skipping 30 matching lines...) Expand all
70 71
71 private: 72 private:
72 friend class base::RefCountedThreadSafe<NativePixmap>; 73 friend class base::RefCountedThreadSafe<NativePixmap>;
73 74
74 DISALLOW_COPY_AND_ASSIGN(NativePixmap); 75 DISALLOW_COPY_AND_ASSIGN(NativePixmap);
75 }; 76 };
76 77
77 } // namespace ui 78 } // namespace ui
78 79
79 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ 80 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698