Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Unified Diff: cc/output/overlay_candidate.h

Issue 208213003: Plumb overlay processing into DirectRenderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Introduced ScopedExportLock Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/output/overlay_candidate.h
diff --git a/cc/output/overlay_candidate.h b/cc/output/overlay_candidate.h
index c53013630d66aacb0462799b84c0c1eee324b256..e6883ccc3520a34bffd92de4bd9727beb63796a3 100644
--- a/cc/output/overlay_candidate.h
+++ b/cc/output/overlay_candidate.h
@@ -11,11 +11,14 @@
#include "cc/base/cc_export.h"
#include "cc/resources/resource_format.h"
#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/transform.h"
namespace cc {
-struct CC_EXPORT OverlayCandidate {
+class CC_EXPORT OverlayCandidate {
+ public:
enum OverlayTransform {
+ INVALID,
NONE,
FLIP_HORIZONTAL,
FLIP_VERTICAL,
@@ -24,6 +27,12 @@ struct CC_EXPORT OverlayCandidate {
ROTATE_270,
};
+ static OverlayTransform GetOverlayTransform(
+ const gfx::Transform& quad_transform,
+ bool flipped);
+ static gfx::Rect GetOverlayRect(const gfx::Transform& quad_transform,
+ const gfx::Rect& rect);
+
OverlayCandidate();
~OverlayCandidate();
@@ -35,12 +44,19 @@ struct CC_EXPORT OverlayCandidate {
gfx::Rect display_rect;
// Crop within the buffer to be placed inside |display_rect|.
gfx::RectF uv_rect;
+ // Texture resource to present in an overlay.
+ unsigned resource_id;
+ // Stacking order of the overlay plane relative to the main surface,
+ // which is 0. Signed to allow for "underlays".
+ int plane_z_order;
// To be modified by the implementer if this candidate can go into
// an overlay.
bool overlay_handled;
};
+typedef std::vector<OverlayCandidate> OverlayCandidateList;
+
} // namespace cc
#endif // CC_OUTPUT_OVERLAY_CANDIDATE_H_

Powered by Google App Engine
This is Rietveld 408576698