Skip to content

Commit

Permalink
Ensure in use params are in cache
Browse files Browse the repository at this point in the history
Cache might have removed all params stored in in_use_compatible_params_,
depending when we have last tried to get them from cache.
This was failing some of the DCHECKS in place.

Tested by playing Video and scrolling the page up/down till we hit the
maximum cache size of 100.

Review URL: https://codereview.chromium.org/1375963006

Cr-Commit-Position: refs/heads/master@{#353812}
  • Loading branch information
kalyankondapally authored and Commit bot committed Oct 13, 2015
1 parent d196fac commit 578e3bd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/ozone/platform/drm/host/drm_overlay_candidates_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ uint32_t DrmOverlayCandidatesHost::CalculateCandidateWeight(

void DrmOverlayCandidatesHost::ValidateCandidates(
OverlaySurfaceCandidateList* candidates) {
// Make sure params being currently used are in cache. They might have been
// removed in case we haven't tried to get them from cache for a while.
for (const auto& param : in_use_compatible_params_)
cache_.Put(param.first, true);

in_use_compatible_params_.clear();
typedef std::pair<OverlaySurfaceCandidate*, OverlayCheck_Params>
CandidatePair;
Expand Down

0 comments on commit 578e3bd

Please sign in to comment.