| Index: ui/gfx/ozone/overlay_hal_ozone.h
|
| diff --git a/ui/gfx/ozone/overlay_hal_ozone.h b/ui/gfx/ozone/overlay_hal_ozone.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..966078d6d46b085b537509b7b2f6990f322decc1
|
| --- /dev/null
|
| +++ b/ui/gfx/ozone/overlay_hal_ozone.h
|
| @@ -0,0 +1,59 @@
|
| +// Copyright 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef UI_GFX_OZONE_OVERLAY_HAL_OZONE_H_
|
| +#define UI_GFX_OZONE_OVERLAY_HAL_OZONE_H_
|
| +
|
| +#include <vector>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "ui/gfx/gfx_export.h"
|
| +#include "ui/gfx/rect.h"
|
| +
|
| +namespace gfx {
|
| +
|
| +class GFX_EXPORT OverlayHALOzone {
|
| + public:
|
| + enum Format {
|
| + UNKNOWN,
|
| + RGBA,
|
| + RGB,
|
| + YUV,
|
| + NATIVE_TEXTURE,
|
| + };
|
| +
|
| + struct SurfaceCandidate {
|
| + SurfaceCandidate();
|
| + ~SurfaceCandidate();
|
| + // This rect, after applying the quad_transform(), gives the geometry that
|
| + // this quad should draw to. This rect lives in content space.
|
| + gfx::Rect rect;
|
| +
|
| + Format format;
|
| +
|
| + // To be modified by the HAL implementer.
|
| + bool overlay_handled;
|
| + };
|
| +
|
| + OverlayHALOzone();
|
| + virtual ~OverlayHALOzone();
|
| +
|
| + // Returns the instance
|
| + static OverlayHALOzone* GetInstance();
|
| +
|
| + // Sets the implementation delegate. Ownership is retained by the caller.
|
| + static void SetInstance(OverlayHALOzone* impl);
|
| +
|
| + static OverlayHALOzone* CreateTestHelper();
|
| +
|
| + typedef std::vector<SurfaceCandidate> SurfaceCandidateList;
|
| + virtual void CheckOverlaySupport(SurfaceCandidateList* surfaces) = 0;
|
| +
|
| + private:
|
| + static OverlayHALOzone* impl_; // not owned
|
| +};
|
| +
|
| +} // namespace gfx
|
| +
|
| +#endif // UI_GFX_OZONE_OVERLAY_HAL_OZONE_H_
|
|
|