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

Unified Diff: cc/output/overlay_candidate.cc

Issue 2508203004: Add hints for potential overlay promotion on android. (Closed)
Patch Set: #include and comment cleanup Created 4 years, 1 month 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.cc
diff --git a/cc/output/overlay_candidate.cc b/cc/output/overlay_candidate.cc
index 5ed4bf493833c34164e67b9d67f817fa01c6a9b7..5c3966244188692541d96afa3de821900db22de1 100644
--- a/cc/output/overlay_candidate.cc
+++ b/cc/output/overlay_candidate.cc
@@ -173,9 +173,13 @@ OverlayCandidate::OverlayCandidate()
is_clipped(false),
use_output_surface_for_resource(false),
resource_id(0),
+#if defined(OS_ANDROID)
+ is_backed_by_surface_texture(false),
+#endif
plane_z_order(0),
is_unoccluded(false),
- overlay_handled(false) {}
+ overlay_handled(false) {
+}
OverlayCandidate::OverlayCandidate(const OverlayCandidate& other) = default;
@@ -282,6 +286,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 +318,8 @@ bool OverlayCandidate::FromStreamVideoQuad(ResourceProvider* resource_provider,
return true;
}
+bool OverlayCandidateValidator::IsResourcePromotable(ResourceId resource_id) {
+ return false;
+}
+
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698