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

Unified Diff: cc/output/overlay_strategy_single_on_top.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_single_on_top.h
diff --git a/cc/output/overlay_strategy_single_on_top.h b/cc/output/overlay_strategy_single_on_top.h
index 17c763d8896e6201c088952406011b0dce7b345e..e2991e48db42fda7f1f696de6b11eedc3c1c5cb5 100644
--- a/cc/output/overlay_strategy_single_on_top.h
+++ b/cc/output/overlay_strategy_single_on_top.h
@@ -5,32 +5,29 @@
#ifndef CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_
#define CC_OUTPUT_OVERLAY_STRATEGY_SINGLE_ON_TOP_H_
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "cc/base/cc_export.h"
-#include "cc/output/overlay_candidate.h"
#include "cc/output/overlay_processor.h"
-#include "cc/output/overlay_strategy_common.h"
-#include "cc/quads/render_pass.h"
namespace cc {
-class StreamVideoDrawQuad;
-class TextureDrawQuad;
-class CC_EXPORT OverlayStrategySingleOnTop
- : public OverlayStrategyCommonDelegate {
+class OverlayCandidateValidator;
+
+class CC_EXPORT OverlayStrategySingleOnTop : public OverlayProcessor::Strategy {
public:
- OverlayStrategySingleOnTop() {}
+ explicit OverlayStrategySingleOnTop(
+ OverlayCandidateValidator* capability_checker);
~OverlayStrategySingleOnTop() 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:
+ bool TryOverlay(QuadList& quad_list,
+ OverlayCandidateList* candidate_list,
+ const OverlayCandidate& candidate,
+ QuadList::Iterator candidate_iterator);
+
+ OverlayCandidateValidator* capability_checker_; // Weak.
+
DISALLOW_COPY_AND_ASSIGN(OverlayStrategySingleOnTop);
};

Powered by Google App Engine
This is Rietveld 408576698