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

Unified Diff: cc/output/overlay_candidate.cc

Issue 2745143003: cc: Make OverlayCandidate use gfx::BufferFormat instead of cc::ResourceFormat. (Closed)
Patch Set: Created 3 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.cc
diff --git a/cc/output/overlay_candidate.cc b/cc/output/overlay_candidate.cc
index e41b62b4bf175a95b4bf93a1149ce49f5c1d2fa9..20d54b8359697f2cdbb3f1e8e99ab38f5108f038 100644
--- a/cc/output/overlay_candidate.cc
+++ b/cc/output/overlay_candidate.cc
@@ -173,7 +173,7 @@ gfx::OverlayTransform ComposeTransforms(gfx::OverlayTransform delta,
OverlayCandidate::OverlayCandidate()
: transform(gfx::OVERLAY_TRANSFORM_NONE),
- format(RGBA_8888),
+ format(gfx::BufferFormat::RGBA_8888),
uv_rect(0.f, 0.f, 1.f, 1.f),
is_clipped(false),
use_output_surface_for_resource(false),
@@ -206,7 +206,6 @@ bool OverlayCandidate::FromDrawQuad(ResourceProvider* resource_provider,
candidate->quad_rect_in_target_space =
MathUtil::MapEnclosingClippedRect(transform, quad->rect);
- candidate->format = RGBA_8888;
candidate->clip_rect = quad->shared_quad_state->clip_rect;
candidate->is_clipped = quad->shared_quad_state->is_clipped;
@@ -262,11 +261,9 @@ bool OverlayCandidate::FromTextureQuad(ResourceProvider* resource_provider,
OverlayCandidate* candidate) {
if (!resource_provider->IsOverlayCandidate(quad->resource_id()))
return false;
-
- gfx::BufferFormat format =
- resource_provider->GetBufferFormat(quad->resource_id());
+ candidate->format = resource_provider->GetBufferFormat(quad->resource_id());
if (std::find(std::begin(kOverlayFormats), std::end(kOverlayFormats),
- format) == std::end(kOverlayFormats))
+ candidate->format) == std::end(kOverlayFormats))
return false;
gfx::OverlayTransform overlay_transform = GetOverlayTransform(
quad->shared_quad_state->quad_to_target_transform, quad->y_flipped);
« no previous file with comments | « cc/output/overlay_candidate.h ('k') | components/display_compositor/compositor_overlay_candidate_validator_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698