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

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

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header 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
« no previous file with comments | « ui/ozone/public/input_controller.cc ('k') | ui/ozone/public/overlay_candidates_ozone.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_
6 #define UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/gfx/overlay_transform.h"
11
12 namespace gfx {
13 class Rect;
14 class RectF;
15 }
16
17 namespace ui {
18
19 // This represents a buffer that can be directly imported via GL for
20 // rendering, or exported via dma-buf fds.
21 class NativePixmap : public base::RefCountedThreadSafe<NativePixmap> {
22 public:
23 NativePixmap() {}
24
25 virtual void* /* EGLClientBuffer */ GetEGLClientBuffer() = 0;
26 virtual int GetDmaBufFd() = 0;
27 virtual int GetDmaBufPitch() = 0;
28
29 // Sets the overlay plane to switch to at the next page flip.
30 // |w| specifies the screen to display this overlay plane on.
31 // |plane_z_order| specifies the stacking order of the plane relative to the
32 // main framebuffer located at index 0.
33 // |plane_transform| specifies how the buffer is to be transformed during.
34 // composition.
35 // |buffer| to be presented by the overlay.
36 // |display_bounds| specify where it is supposed to be on the screen.
37 // |crop_rect| specifies the region within the buffer to be placed
38 // inside |display_bounds|. This is specified in texture coordinates, in the
39 // range of [0,1].
40 virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
41 int plane_z_order,
42 gfx::OverlayTransform plane_transform,
43 const gfx::Rect& display_bounds,
44 const gfx::RectF& crop_rect) = 0;
45
46 protected:
47 virtual ~NativePixmap() {}
48
49 private:
50 friend class base::RefCountedThreadSafe<NativePixmap>;
51
52 DISALLOW_COPY_AND_ASSIGN(NativePixmap);
53 };
54
55 } // namespace ui
56
57 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_
OLDNEW
« no previous file with comments | « ui/ozone/public/input_controller.cc ('k') | ui/ozone/public/overlay_candidates_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698