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

Unified Diff: cc/output/overlay_strategy_sandwich.h

Issue 1372103005: Refactor OverlayStrategySandwich and OverlayStrategyCommon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SolidColor
Patch Set: Delete OverlayStrategyCommon Created 5 years, 3 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_strategy_sandwich.h
diff --git a/cc/output/overlay_strategy_sandwich.h b/cc/output/overlay_strategy_sandwich.h
index a1bd9d1bb24e7ea0200f6ab380eadb0992013c33..afab8e6c747b4307ce335ab056b91ae12ccb83ff 100644
--- a/cc/output/overlay_strategy_sandwich.h
+++ b/cc/output/overlay_strategy_sandwich.h
@@ -5,27 +5,33 @@
#ifndef CC_OUTPUT_OVERLAY_STRATEGY_SANDWICH_H_
#define CC_OUTPUT_OVERLAY_STRATEGY_SANDWICH_H_
-#include "cc/output/overlay_strategy_common.h"
+#include "cc/output/overlay_processor.h"
namespace cc {
+class OverlayCandidateValidator;
+
// The sandwich strategy looks for a video quad without regard to quads above
// it. The video is "overlaid" on top of the scene, and then the non-empty
// parts of the scene are "overlaid" on top of the video. This is only valid
// for overlay contents that are fully opaque.
-class CC_EXPORT OverlayStrategySandwich : public OverlayStrategyCommonDelegate {
+class CC_EXPORT OverlayStrategySandwich : public OverlayProcessor::Strategy {
public:
- OverlayStrategySandwich() {}
+ explicit OverlayStrategySandwich(
+ OverlayCandidateValidator* capability_checker);
~OverlayStrategySandwich() override;
- OverlayResult TryOverlay(OverlayCandidateValidator* capability_checker,
- RenderPassList* render_passes_in_draw_order,
- OverlayCandidateList* candidate_list,
- const OverlayCandidate& candidate,
- QuadList::Iterator* candidate_iterator,
- float device_scale_factor) override;
+ bool Attempt(RenderPassList* render_passes,
+ OverlayCandidateList* candidate_list) override;
private:
+ QuadList::Iterator TryOverlay(RenderPass* render_pass,
+ OverlayCandidateList* candidate_list,
+ const OverlayCandidate& candidate,
+ QuadList::Iterator candidate_iterator);
+
+ OverlayCandidateValidator* capability_checker_; // Weak.
+
DISALLOW_COPY_AND_ASSIGN(OverlayStrategySandwich);
};

Powered by Google App Engine
This is Rietveld 408576698