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

Unified Diff: cc/output/overlay_candidate.h

Issue 1531403002: Revert "Delete CC." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « cc/output/output_surface_unittest.cc ('k') | cc/output/overlay_candidate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/overlay_candidate.h
diff --git a/cc/output/overlay_candidate.h b/cc/output/overlay_candidate.h
new file mode 100644
index 0000000000000000000000000000000000000000..30cfea18d21053ab7d2eca0e1f645957b7f7e90a
--- /dev/null
+++ b/cc/output/overlay_candidate.h
@@ -0,0 +1,55 @@
+// Copyright 2014 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 CC_OUTPUT_OVERLAY_CANDIDATE_H_
+#define CC_OUTPUT_OVERLAY_CANDIDATE_H_
+
+#include <vector>
+
+#include "cc/resources/resource_format.h"
+#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/overlay_transform.h"
+#include "ui/gfx/transform.h"
+
+namespace cc {
+
+class OverlayCandidate {
+ public:
+ static gfx::OverlayTransform GetOverlayTransform(
+ const gfx::Transform& quad_transform,
+ bool flipped);
+ // Apply transform |delta| to |in| and return the resulting transform,
+ // or OVERLAY_TRANSFORM_INVALID.
+ static gfx::OverlayTransform ModifyTransform(gfx::OverlayTransform in,
+ gfx::OverlayTransform delta);
+ static gfx::Rect GetOverlayRect(const gfx::Transform& quad_transform,
+ const gfx::Rect& rect);
+
+ OverlayCandidate();
+ ~OverlayCandidate();
+
+ // Transformation to apply to layer during composition.
+ gfx::OverlayTransform transform;
+ // Format of the buffer to composite.
+ 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|.
+ 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_
« no previous file with comments | « cc/output/output_surface_unittest.cc ('k') | cc/output/overlay_candidate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698