OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 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_GFX_OZONE_OVERLAY_HAL_OZONE_H_ |
| 6 #define UI_GFX_OZONE_OVERLAY_HAL_OZONE_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "ui/gfx/gfx_export.h" |
| 12 #include "ui/gfx/rect.h" |
| 13 |
| 14 namespace gfx { |
| 15 |
| 16 class GFX_EXPORT OverlayHALOzone { |
| 17 public: |
| 18 enum Format { |
| 19 UNKNOWN, |
| 20 RGBA, |
| 21 RGB, |
| 22 YUV, |
| 23 NATIVE_TEXTURE, |
| 24 }; |
| 25 |
| 26 struct SurfaceCandidate { |
| 27 SurfaceCandidate(); |
| 28 ~SurfaceCandidate(); |
| 29 // This rect, after applying the quad_transform(), gives the geometry that |
| 30 // this quad should draw to. This rect lives in content space. |
| 31 gfx::Rect rect; |
| 32 |
| 33 Format format; |
| 34 |
| 35 // To be modified by the HAL implementer. |
| 36 bool overlay_handled; |
| 37 }; |
| 38 |
| 39 OverlayHALOzone(); |
| 40 virtual ~OverlayHALOzone(); |
| 41 |
| 42 // Returns the instance |
| 43 static OverlayHALOzone* GetInstance(); |
| 44 |
| 45 // Sets the implementation delegate. Ownership is retained by the caller. |
| 46 static void SetInstance(OverlayHALOzone* impl); |
| 47 |
| 48 static OverlayHALOzone* CreateTestHelper(); |
| 49 |
| 50 typedef std::vector<SurfaceCandidate> SurfaceCandidateList; |
| 51 virtual void CheckOverlaySupport(SurfaceCandidateList* surfaces) = 0; |
| 52 |
| 53 private: |
| 54 static OverlayHALOzone* impl_; // not owned |
| 55 }; |
| 56 |
| 57 } // namespace gfx |
| 58 |
| 59 #endif // UI_GFX_OZONE_OVERLAY_HAL_OZONE_H_ |
OLD | NEW |