Index: cc/output/overlay_candidates.h |
diff --git a/ui/gfx/ozone/overlay_candidates_ozone.h b/cc/output/overlay_candidates.h |
similarity index 61% |
copy from ui/gfx/ozone/overlay_candidates_ozone.h |
copy to cc/output/overlay_candidates.h |
index 85e21b982027b1b5ac4b4800a5487311e3104beb..0041eb558bd29da8ecf13d28810cfa52ea93e7d0 100644 |
--- a/ui/gfx/ozone/overlay_candidates_ozone.h |
+++ b/cc/output/overlay_candidates.h |
@@ -2,35 +2,45 @@ |
// 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_ |
+#ifndef CC_OUTPUT_OVERLAY_CANDIDATES_H_ |
+#define CC_OUTPUT_OVERLAY_CANDIDATES_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" |
+#include "cc/base/cc_export.h" |
+#include "cc/resources/resource_format.h" |
+#include "ui/gfx/geometry/rect.h" |
-namespace gfx { |
+namespace cc { |
-// This class can be used to answer questions about possible overlay |
-// configurations for a particular output device. We get an instance of this |
-// class from SurfaceFactoryOzone given an AcceleratedWidget. |
-class GFX_EXPORT OverlayCandidatesOzone { |
+// This class that can be used to answer questions about possible overlay |
+// configurations for a particular output device. |
+class CC_EXPORT OverlayCandidates { |
enne (OOO)
2014/03/14 18:13:41
bikeshed: If it answers questions, maybe this is a
alexst (slow to review)
2014/03/14 19:54:22
This name is a result of bikeshedding elsewhere. :
|
public: |
+ enum OverlayTransform { |
+ NONE, |
+ FLIP_HORIZONTAL, |
+ FLIP_VERTICAL, |
+ ROTATE_90, |
+ ROTATE_180, |
+ ROTATE_270, |
+ }; |
+ |
struct OverlaySurfaceCandidate { |
enne (OOO)
2014/03/14 18:13:41
Move this out to a separate file, to narrow visibi
|
OverlaySurfaceCandidate(); |
~OverlaySurfaceCandidate(); |
// Transformation to apply to layer during composition. |
- SurfaceFactoryOzone::OverlayTransform transform; |
+ OverlayTransform transform; |
// Format of the buffer to composite. |
- SurfaceFactoryOzone::BufferFormat format; |
+ ResourceFormat format; |
// Rect on the display to position the overlay to. |
gfx::Rect display_rect; |
// Crop within the buffer to be placed inside |display_rect|. |
enne (OOO)
2014/03/14 18:13:41
Can you say that this is in uv space and not in pi
|
gfx::RectF crop_rect; |
+ // Resource id of the buffer to present. |
+ unsigned resource_id; |
piman
2014/03/14 03:42:34
Will we need things like blending mode or somethin
alexst (slow to review)
2014/03/14 19:54:22
Yeah, I was going for a minimal subset and omitted
|
// To be modified by the implementer if this candidate can go into |
// an overlay. |
@@ -45,9 +55,9 @@ class GFX_EXPORT OverlayCandidatesOzone { |
// to be tranditionally composited. |
enne (OOO)
2014/03/14 18:13:41
typo
alexst (slow to review)
2014/03/14 19:54:22
Done.
|
virtual void CheckOverlaySupport(OverlaySurfaceCandidateList* surfaces); |
piman
2014/03/14 03:42:34
pure virtual?
alexst (slow to review)
2014/03/14 19:54:22
Done.
|
- virtual ~OverlayCandidatesOzone(); |
+ virtual ~OverlayCandidates(); |
}; |
-} // namespace gfx |
+} // namespace cc |
-#endif // UI_GFX_OZONE_OVERLAY_CANDIDATES_OZONE_H_ |
+#endif // CC_OUTPUT_OVERLAY_CANDIDATES_H_ |