OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_FACTORY_OZONE_H_ | 5 #ifndef UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ |
6 #define UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ | 6 #define UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/native_library.h" | 10 #include "base/native_library.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 // Get the hal struct to check for overlay support. | 113 // Get the hal struct to check for overlay support. |
114 virtual OverlayCandidatesOzone* GetOverlayCandidates( | 114 virtual OverlayCandidatesOzone* GetOverlayCandidates( |
115 gfx::AcceleratedWidget w); | 115 gfx::AcceleratedWidget w); |
116 | 116 |
117 // Cleate a single native buffer to be used for overlay planes. | 117 // Cleate a single native buffer to be used for overlay planes. |
118 virtual scoped_refptr<NativePixmap> CreateNativePixmap( | 118 virtual scoped_refptr<NativePixmap> CreateNativePixmap( |
119 gfx::Size size, | 119 gfx::Size size, |
120 BufferFormat format); | 120 BufferFormat format); |
121 | 121 |
122 // Sets the overlay plane to switch to at the next page flip. | |
123 // |w| specifies the screen to display this overlay plane on. | |
124 // |plane_z_order| specifies the stacking order of the plane relative to the | |
125 // main framebuffer located at index 0. | |
126 // |plane_transform| specifies how the buffer is to be transformed during. | |
127 // composition. | |
128 // |buffer| to be presented by the overlay. | |
129 // |display_bounds| specify where it is supposed to be on the screen. | |
130 // |crop_rect| specifies the region within the buffer to be placed | |
131 // inside |display_bounds|. This is specified in texture coordinates, in the | |
132 // range of [0,1]. | |
133 virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | |
134 int plane_z_order, | |
135 gfx::OverlayTransform plane_transform, | |
136 scoped_refptr<NativePixmap> buffer, | |
137 const gfx::Rect& display_bounds, | |
138 const gfx::RectF& crop_rect); | |
139 | |
140 // Returns true if overlays can be shown at z-index 0, replacing the main | 122 // Returns true if overlays can be shown at z-index 0, replacing the main |
141 // surface. Combined with surfaceless extensions, it allows for an | 123 // surface. Combined with surfaceless extensions, it allows for an |
142 // overlay-only mode. | 124 // overlay-only mode. |
143 virtual bool CanShowPrimaryPlaneAsOverlay(); | 125 virtual bool CanShowPrimaryPlaneAsOverlay(); |
144 | 126 |
145 private: | 127 private: |
146 static SurfaceFactoryOzone* impl_; // not owned | 128 static SurfaceFactoryOzone* impl_; // not owned |
147 }; | 129 }; |
148 | 130 |
149 } // namespace ui | 131 } // namespace ui |
150 | 132 |
151 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ | 133 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ |
OLD | NEW |