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

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

Issue 1134993003: ozone: Implement zero/one-copy texture for Ozone GBM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: not-leak USE_OZONE_GBM, GetSupportedGpuMemoryBufferConfigurations from ozone, return handle Created 5 years, 7 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/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 9
10 namespace gfx {
11
12 struct GpuMemoryBufferHandle;
reveman 2015/05/14 13:22:03 This code should not know about GpuMemoryBuffers.
13
14 } // namespace gfx
15
10 namespace ui { 16 namespace ui {
11 17
12 // This represents a buffer that can be directly imported via GL for 18 // This represents a buffer that can be directly imported via GL for
13 // rendering, or exported via dma-buf fds. 19 // rendering, or exported via dma-buf fds.
14 class NativePixmap : public base::RefCountedThreadSafe<NativePixmap> { 20 class NativePixmap : public base::RefCountedThreadSafe<NativePixmap> {
15 public: 21 public:
16 NativePixmap() {} 22 NativePixmap() {}
17 23
18 virtual void* /* EGLClientBuffer */ GetEGLClientBuffer() = 0; 24 virtual void* /* EGLClientBuffer */ GetEGLClientBuffer() = 0;
19 virtual int GetDmaBufFd() = 0; 25 virtual int GetDmaBufFd() = 0;
20 virtual int GetDmaBufPitch() = 0; 26 virtual int GetDmaBufPitch() = 0;
21 27
28 enum BufferUsage {
29 MAP,
30 SCANOUT,
31 };
32 virtual BufferUsage GetBufferUsage() const = 0;
33
22 protected: 34 protected:
23 virtual ~NativePixmap() {} 35 virtual ~NativePixmap() {}
24 36
25 private: 37 private:
26 friend class base::RefCountedThreadSafe<NativePixmap>; 38 friend class base::RefCountedThreadSafe<NativePixmap>;
27 39
28 DISALLOW_COPY_AND_ASSIGN(NativePixmap); 40 DISALLOW_COPY_AND_ASSIGN(NativePixmap);
29 }; 41 };
30 42
31 } // namespace ui 43 } // namespace ui
32 44
33 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ 45 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698