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

Unified Diff: cc/output/overlay_candidate.h

Issue 2508203004: Add hints for potential overlay promotion on android. (Closed)
Patch Set: rebased Created 4 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/ipc/transferable_resource_struct_traits.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
index 7ced45c4f1b9b3f3595de974a6f1d1205d1822cb..68d62e3e91cb96e051deb3df2f9719caf7769eb4 100644
--- a/cc/output/overlay_candidate.h
+++ b/cc/output/overlay_candidate.h
@@ -8,6 +8,7 @@
#include <vector>
#include "cc/base/cc_export.h"
+#include "cc/base/resource_id.h"
#include "cc/quads/render_pass.h"
#include "cc/resources/resource_format.h"
#include "ui/gfx/geometry/rect.h"
@@ -70,6 +71,18 @@ class CC_EXPORT OverlayCandidate {
bool use_output_surface_for_resource;
// Texture resource to present in an overlay.
unsigned resource_id;
+
+#if defined(OS_ANDROID)
+ // For candidates from StreamVideoDrawQuads, this records whether the quad is
+ // marked as being backed by a SurfaceTexture or not. If so, it's not really
+ // promotable to an overlay.
+ bool is_backed_by_surface_texture;
+
+ // Filled in by the OverlayCandidateValidator to indicate whether this is a
+ // promotable candidate or not.
+ bool is_promotable_hint;
+#endif
+
// Stacking order of the overlay plane relative to the main surface,
// which is 0. Signed to allow for "underlays".
int plane_z_order;
@@ -91,7 +104,20 @@ class CC_EXPORT OverlayCandidate {
OverlayCandidate* candidate);
};
-typedef std::vector<OverlayCandidate> OverlayCandidateList;
+class CC_EXPORT OverlayCandidateList : public std::vector<OverlayCandidate> {
+ public:
+ OverlayCandidateList();
+ OverlayCandidateList(const OverlayCandidateList&);
+ OverlayCandidateList(OverlayCandidateList&&);
+ ~OverlayCandidateList();
+
+ OverlayCandidateList& operator=(const OverlayCandidateList&);
+ OverlayCandidateList& operator=(OverlayCandidateList&&);
+
+ // For android, this provides a set of resources that could be promoted to
+ // overlay, if one backs them with a SurfaceView.
+ ResourceIdSet promotable_resource_hints_;
+};
} // namespace cc
« no previous file with comments | « cc/ipc/transferable_resource_struct_traits.cc ('k') | cc/output/overlay_candidate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698