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

Unified Diff: cc/output/overlay_processor.cc

Issue 1414923006: Revert of Avoid Copying damage rect when using Overlays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « cc/output/overlay_processor.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_processor.cc
diff --git a/cc/output/overlay_processor.cc b/cc/output/overlay_processor.cc
index 59434b01fae3036237131b99b6245440b99b8797..69368a1bd5d2f6ec8d9f9698e7d4f0df79701cda 100644
--- a/cc/output/overlay_processor.cc
+++ b/cc/output/overlay_processor.cc
@@ -11,14 +11,6 @@
#include "ui/gfx/transform.h"
namespace cc {
-
-namespace {
-
-bool SortByZOrder(const OverlayCandidate& a, const OverlayCandidate& b) {
- return (a.plane_z_order < b.plane_z_order);
-}
-
-} // namespace
OverlayProcessor::OverlayProcessor(OutputSurface* surface) : surface_(surface) {
}
@@ -35,21 +27,10 @@
void OverlayProcessor::ProcessForOverlays(ResourceProvider* resource_provider,
RenderPassList* render_passes,
- OverlayCandidateList* candidates,
- gfx::Rect* damage_rect) {
+ OverlayCandidateList* candidates) {
for (auto strategy : strategies_) {
- if (strategy->Attempt(resource_provider, render_passes, candidates)) {
- std::sort(candidates->begin(), candidates->end(), SortByZOrder);
-
- for (const OverlayCandidate& overlay : *candidates) {
- if (overlay.plane_z_order <= 0 || overlay.needs_blending)
- continue;
-
- damage_rect->Subtract(ToEnclosedRect(overlay.display_rect));
- }
-
+ if (strategy->Attempt(resource_provider, render_passes, candidates))
return;
- }
}
}
« no previous file with comments | « cc/output/overlay_processor.h ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698