OLD | NEW |
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_SURFACE_OZONE_EGL_H_ | 5 #ifndef UI_OZONE_PUBLIC_SURFACE_OZONE_EGL_H_ |
6 #define UI_OZONE_PUBLIC_SURFACE_OZONE_EGL_H_ | 6 #define UI_OZONE_PUBLIC_SURFACE_OZONE_EGL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/gfx/overlay_transform.h" | 10 #include "ui/gfx/overlay_transform.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // Called after we swap buffers. This is usually a no-op but can | 37 // Called after we swap buffers. This is usually a no-op but can |
38 // be used to present the new front buffer if the platform requires this. | 38 // be used to present the new front buffer if the platform requires this. |
39 virtual bool OnSwapBuffers() = 0; | 39 virtual bool OnSwapBuffers() = 0; |
40 | 40 |
41 // Returns a gfx::VsyncProvider for this surface. Note that this may be | 41 // Returns a gfx::VsyncProvider for this surface. Note that this may be |
42 // called after we have entered the sandbox so if there are operations (e.g. | 42 // called after we have entered the sandbox so if there are operations (e.g. |
43 // opening a file descriptor providing vsync events) that must be done | 43 // opening a file descriptor providing vsync events) that must be done |
44 // outside of the sandbox, they must have been completed in | 44 // outside of the sandbox, they must have been completed in |
45 // InitializeHardware. Returns an empty scoped_ptr on error. | 45 // InitializeHardware. Returns an empty scoped_ptr on error. |
46 virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() = 0; | 46 virtual scoped_ptr<gfx::VSyncProvider> CreateVSyncProvider() = 0; |
47 | |
48 // Sets the overlay plane to switch to at the next page flip. | |
49 // |plane_z_order| specifies the stacking order of the plane relative to the | |
50 // main framebuffer located at index 0. | |
51 // |plane_transform| specifies how the buffer is to be transformed during. | |
52 // composition. | |
53 // |buffer| to be presented by the overlay. | |
54 // |display_bounds| specify where it is supposed to be on the screen. | |
55 // |crop_rect| specifies the region within the buffer to be placed | |
56 // inside |display_bounds|. This is specified in texture coordinates, in the | |
57 // range of [0,1]. | |
58 virtual bool ScheduleOverlayPlane(int plane_z_order, | |
59 gfx::OverlayTransform plane_transform, | |
60 scoped_refptr<NativePixmap> buffer, | |
61 const gfx::Rect& display_bounds, | |
62 const gfx::RectF& crop_rect) = 0; | |
63 }; | 47 }; |
64 | 48 |
65 } // namespace ui | 49 } // namespace ui |
66 | 50 |
67 #endif // UI_OZONE_PUBLIC_SURFACE_OZONE_EGL_H_ | 51 #endif // UI_OZONE_PUBLIC_SURFACE_OZONE_EGL_H_ |
OLD | NEW |