Chromium Code Reviews| Index: ui/gfx/ozone/overlay_candidates_ozone.h |
| diff --git a/ui/gfx/ozone/overlay_candidates_ozone.h b/ui/gfx/ozone/overlay_candidates_ozone.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..58767db190e5b9d7a81e122a0196788dcdff6e94 |
| --- /dev/null |
| +++ b/ui/gfx/ozone/overlay_candidates_ozone.h |
| @@ -0,0 +1,52 @@ |
| +// 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_CANDIDATES_OZONE_H_ |
| +#define UI_GFX_OZONE_OVERLAY_CANDIDATES_OZONE_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/basictypes.h" |
| +#include "ui/gfx/gfx_export.h" |
| +#include "ui/gfx/ozone/surface_factory_ozone.h" |
| +#include "ui/gfx/rect_f.h" |
| + |
| +namespace gfx { |
| + |
| +// This class that can be used to answer questions about possible overlay |
|
rjkroege
2014/03/04 18:54:08
s/that//
alexst (slow to review)
2014/03/04 20:04:53
Done.
|
| +// configurations for a particular output device. |
| +class GFX_EXPORT OverlayCandidatesOzone { |
|
rjkroege
2014/03/04 18:54:08
we discussed how this dangles of SFOz because it n
|
| + public: |
| + struct OverlaySurfaceCandidate { |
| + OverlaySurfaceCandidate(); |
| + ~OverlaySurfaceCandidate(); |
| + |
| + // Transformation to apply to layer during composition. |
| + SurfaceFactoryOzone::OverlayTransform transform; |
| + // Format of the buffer to composite. |
| + SurfaceFactoryOzone::BufferFormat format; |
|
rjkroege
2014/03/04 18:54:08
some of the SoCs have display generators of varyin
alexst (slow to review)
2014/03/04 20:04:53
Yes, the format is a placeholder for now.
|
| + // Rect on the display to position the overlay to. |
| + gfx::Rect display_rect; |
| + // Crop within the buffer to be placed inside |display_rect|. |
| + gfx::RectF crop_rect; |
|
rjkroege
2014/03/04 18:54:08
we could imagine over-drawing to pan via hardware
alexst (slow to review)
2014/03/04 20:04:53
That would actually come for free if CC chose to a
|
| + |
| + // To be modified by the implementer if this candidate can go into |
| + // an overlay. |
| + bool overlay_handled; |
| + }; |
| + |
| + typedef std::vector<OverlaySurfaceCandidate> OverlaySurfaceCandidateList; |
| + |
| + // A list of possible overlay candidates is presented to this function. |
| + // The expected result is that those candidates that can be in a separate |
| + // plane are marked with |overlay_handled| set to true, otherwise they are |
| + // to be tranditionally composited. |
| + virtual void CheckOverlaySupport(OverlaySurfaceCandidateList* surfaces); |
| + |
| + virtual ~OverlayCandidatesOzone(); |
| +}; |
| + |
| +} // namespace gfx |
| + |
| +#endif // UI_GFX_OZONE_OVERLAY_CANDIDATES_OZONE_H_ |