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

Unified Diff: cc/output/overlay_strategy_all_or_nothing.cc

Issue 1430813002: cc: Fork OverlayCandidate to CALayerOverlay (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master1
Patch Set: Rebase Created 5 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
« no previous file with comments | « cc/output/overlay_strategy_all_or_nothing.h ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/overlay_strategy_all_or_nothing.cc
diff --git a/cc/output/overlay_strategy_all_or_nothing.cc b/cc/output/overlay_strategy_all_or_nothing.cc
deleted file mode 100644
index 8181e29b48662b51ffc7136a3b6d0ec25a58aca4..0000000000000000000000000000000000000000
--- a/cc/output/overlay_strategy_all_or_nothing.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/output/overlay_strategy_all_or_nothing.h"
-
-#include "cc/output/overlay_candidate_validator.h"
-#include "cc/quads/draw_quad.h"
-
-namespace cc {
-
-OverlayStrategyAllOrNothing::OverlayStrategyAllOrNothing(
- OverlayCandidateValidator* capability_checker)
- : capability_checker_(capability_checker) {
- DCHECK(capability_checker);
-}
-
-OverlayStrategyAllOrNothing::~OverlayStrategyAllOrNothing() {}
-
-bool OverlayStrategyAllOrNothing::Attempt(ResourceProvider* resource_provider,
- RenderPassList* render_passes,
- OverlayCandidateList* candidates,
- gfx::Rect* damage_rect) {
- QuadList& quad_list = render_passes->back()->quad_list;
- OverlayCandidateList new_candidates;
- int next_z_order = -1;
-
- for (const DrawQuad* quad : quad_list) {
- OverlayCandidate candidate;
- if (!OverlayCandidate::FromDrawQuad(resource_provider, quad, &candidate))
- return false;
- candidate.plane_z_order = next_z_order--;
- new_candidates.push_back(candidate);
- }
-
- capability_checker_->CheckOverlaySupport(&new_candidates);
- for (const OverlayCandidate& candidate : new_candidates) {
- if (!candidate.overlay_handled)
- return false;
- }
-
- quad_list.clear();
- candidates->swap(new_candidates);
- return true;
-}
-
-} // namespace cc
« no previous file with comments | « cc/output/overlay_strategy_all_or_nothing.h ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698