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

Unified Diff: cc/output/overlay_candidate.cc

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/output/overlay_candidate.h ('k') | cc/output/overlay_processor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/overlay_candidate.cc
diff --git a/cc/output/overlay_candidate.cc b/cc/output/overlay_candidate.cc
index 5e083bde6fd1d47e31d6d0ef141ddfe15e11cd18..b528488fc931d73608a0aabfc5f1d965d8403592 100644
--- a/cc/output/overlay_candidate.cc
+++ b/cc/output/overlay_candidate.cc
@@ -173,9 +173,14 @@ OverlayCandidate::OverlayCandidate()
is_clipped(false),
use_output_surface_for_resource(false),
resource_id(0),
+#if defined(OS_ANDROID)
+ is_backed_by_surface_texture(false),
+ is_promotable_hint(false),
+#endif
plane_z_order(0),
is_unoccluded(false),
- overlay_handled(false) {}
+ overlay_handled(false) {
+}
OverlayCandidate::OverlayCandidate(const OverlayCandidate& other) = default;
@@ -282,6 +287,10 @@ bool OverlayCandidate::FromStreamVideoQuad(ResourceProvider* resource_provider,
candidate->resource_id = quad->resource_id();
candidate->resource_size_in_pixels = quad->resource_size_in_pixels();
candidate->transform = overlay_transform;
+#if defined(OS_ANDROID)
+ candidate->is_backed_by_surface_texture =
+ resource_provider->IsBackedBySurfaceTexture(quad->resource_id());
+#endif
gfx::Point3F uv0 = gfx::Point3F(0, 0, 0);
gfx::Point3F uv1 = gfx::Point3F(1, 1, 0);
@@ -310,4 +319,20 @@ bool OverlayCandidate::FromStreamVideoQuad(ResourceProvider* resource_provider,
return true;
}
+OverlayCandidateList::OverlayCandidateList() {}
+
+OverlayCandidateList::OverlayCandidateList(const OverlayCandidateList& other) =
+ default;
+
+OverlayCandidateList::OverlayCandidateList(OverlayCandidateList&& other) =
+ default;
+
+OverlayCandidateList::~OverlayCandidateList() {}
+
+OverlayCandidateList& OverlayCandidateList::operator=(
+ const OverlayCandidateList& other) = default;
+
+OverlayCandidateList& OverlayCandidateList::operator=(
+ OverlayCandidateList&& other) = default;
+
} // namespace cc
« no previous file with comments | « cc/output/overlay_candidate.h ('k') | cc/output/overlay_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698