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

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: rebase to ToT Created 5 years, 5 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/geometry/size.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 {
14 class Rect; 15 class Rect;
15 class RectF; 16 class RectF;
16 } 17 }
17 18
18 namespace ui { 19 namespace ui {
19 20
(...skipping 26 matching lines...) Expand all
46 47
47 // This represents a callback function pointing to scaling unit like VPP 48 // This represents a callback function pointing to scaling unit like VPP
48 // to do scaling operations on native pixmap with required size. 49 // to do scaling operations on native pixmap with required size.
49 typedef base::Callback<scoped_refptr<NativePixmap>(gfx::Size)> 50 typedef base::Callback<scoped_refptr<NativePixmap>(gfx::Size)>
50 ScalingCallback; 51 ScalingCallback;
51 52
52 // Set callback function for the pixmap used for scaling. 53 // Set callback function for the pixmap used for scaling.
53 virtual void SetScalingCallback(const ScalingCallback& scaling_callback) = 0; 54 virtual void SetScalingCallback(const ScalingCallback& scaling_callback) = 0;
54 virtual scoped_refptr<NativePixmap> GetScaledPixmap(gfx::Size new_size) = 0; 55 virtual scoped_refptr<NativePixmap> GetScaledPixmap(gfx::Size new_size) = 0;
55 56
57 enum BufferUsage {
58 MAP,
59 PERSISTENT_MAP,
60 SCANOUT,
61 };
62 virtual BufferUsage GetBufferUsage() const = 0;
63
64 virtual void* Map() = 0;
65 virtual void Unmap() = 0;
66
56 protected: 67 protected:
57 virtual ~NativePixmap() {} 68 virtual ~NativePixmap() {}
58 69
59 private: 70 private:
60 friend class base::RefCountedThreadSafe<NativePixmap>; 71 friend class base::RefCountedThreadSafe<NativePixmap>;
61 72
62 DISALLOW_COPY_AND_ASSIGN(NativePixmap); 73 DISALLOW_COPY_AND_ASSIGN(NativePixmap);
63 }; 74 };
64 75
65 } // namespace ui 76 } // namespace ui
66 77
67 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ 78 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698