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

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

Issue 1263323004: Add NativePixmapHandle type & interface for exporting them (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnecesary #include and DCHECK msgs Created 5 years, 4 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/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "ui/gfx/native_pixmap_handle_ozone.h"
10 #include "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
11 #include "ui/gfx/overlay_transform.h" 12 #include "ui/gfx/overlay_transform.h"
12 13
13 namespace gfx { 14 namespace gfx {
15 class NativePixmapHandle;
14 class Rect; 16 class Rect;
15 class RectF; 17 class RectF;
16 } 18 }
17 19
18 namespace ui { 20 namespace ui {
19 21
20 // 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
21 // rendering, or exported via dma-buf fds. 23 // rendering, or exported via dma-buf fds.
22 class NativePixmap : public base::RefCountedThreadSafe<NativePixmap> { 24 class NativePixmap : public base::RefCountedThreadSafe<NativePixmap> {
23 public: 25 public:
(...skipping 22 matching lines...) Expand all
46 48
47 // This represents a callback function pointing to scaling unit like VPP 49 // This represents a callback function pointing to scaling unit like VPP
48 // to do scaling operations on native pixmap with required size. 50 // to do scaling operations on native pixmap with required size.
49 typedef base::Callback<scoped_refptr<NativePixmap>(gfx::Size)> 51 typedef base::Callback<scoped_refptr<NativePixmap>(gfx::Size)>
50 ScalingCallback; 52 ScalingCallback;
51 53
52 // Set callback function for the pixmap used for scaling. 54 // Set callback function for the pixmap used for scaling.
53 virtual void SetScalingCallback(const ScalingCallback& scaling_callback) = 0; 55 virtual void SetScalingCallback(const ScalingCallback& scaling_callback) = 0;
54 virtual scoped_refptr<NativePixmap> GetScaledPixmap(gfx::Size new_size) = 0; 56 virtual scoped_refptr<NativePixmap> GetScaledPixmap(gfx::Size new_size) = 0;
55 57
58 // Export the buffer for sharing across processes.
59 // Any file descriptors in the exported handle are owned by the caller.
60 virtual gfx::NativePixmapHandle ExportHandle() = 0;
61
56 protected: 62 protected:
57 virtual ~NativePixmap() {} 63 virtual ~NativePixmap() {}
58 64
59 private: 65 private:
60 friend class base::RefCountedThreadSafe<NativePixmap>; 66 friend class base::RefCountedThreadSafe<NativePixmap>;
61 67
62 DISALLOW_COPY_AND_ASSIGN(NativePixmap); 68 DISALLOW_COPY_AND_ASSIGN(NativePixmap);
63 }; 69 };
64 70
65 } // namespace ui 71 } // namespace ui
66 72
67 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ 73 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_
OLDNEW
« ui/ozone/platform/drm/gpu/gbm_buffer.cc ('K') | « ui/ozone/public/client_native_pixmap_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698