| Index: cc/output/overlay_strategy_common.h
|
| diff --git a/cc/output/overlay_strategy_common.h b/cc/output/overlay_strategy_common.h
|
| index 0291be7c4272f84e4ca021af331a307b7394fa5c..6d8c40559eb6afed356c8430ec9d0c73040fb75b 100644
|
| --- a/cc/output/overlay_strategy_common.h
|
| +++ b/cc/output/overlay_strategy_common.h
|
| @@ -16,22 +16,35 @@ class OverlayCandidateValidator;
|
| class StreamVideoDrawQuad;
|
| class TextureDrawQuad;
|
|
|
| +class CC_EXPORT OverlayStrategyCommonDelegate {
|
| + public:
|
| + virtual ~OverlayStrategyCommonDelegate() {}
|
| + virtual bool TryOverlay(OverlayCandidateValidator* capability_checker,
|
| + RenderPassList* render_passes_in_draw_order,
|
| + OverlayCandidateList* candidate_list,
|
| + const OverlayCandidate& candidate,
|
| + QuadList::Iterator iter,
|
| + float device_scale_factor) = 0;
|
| +};
|
| +
|
| class CC_EXPORT OverlayStrategyCommon : public OverlayProcessor::Strategy {
|
| public:
|
| - explicit OverlayStrategyCommon(OverlayCandidateValidator* capability_checker);
|
| + explicit OverlayStrategyCommon(OverlayCandidateValidator* capability_checker,
|
| + OverlayStrategyCommonDelegate* delegate);
|
| ~OverlayStrategyCommon() override;
|
|
|
| bool Attempt(RenderPassList* render_passes_in_draw_order,
|
| - OverlayCandidateList* candidate_list) override;
|
| + OverlayCandidateList* candidate_list,
|
| + float device_scale_factor) override;
|
| +
|
| + // Returns true if |draw_quad| will not block quads underneath from becoming
|
| + // an overlay.
|
| + static bool IsInvisibleQuad(const DrawQuad* draw_quad);
|
|
|
| protected:
|
| bool GetCandidateQuadInfo(const DrawQuad& draw_quad,
|
| OverlayCandidate* quad_info);
|
|
|
| - // Returns true if |draw_quad| will not block quads underneath from becoming
|
| - // an overlay.
|
| - bool IsInvisibleQuad(const DrawQuad* draw_quad);
|
| -
|
| // Returns true if |draw_quad| is of a known quad type and contains an
|
| // overlayable resource.
|
| bool IsOverlayQuad(const DrawQuad* draw_quad);
|
| @@ -43,14 +56,9 @@ class CC_EXPORT OverlayStrategyCommon : public OverlayProcessor::Strategy {
|
| bool GetIOSurfaceQuadInfo(const IOSurfaceDrawQuad& quad,
|
| OverlayCandidate* quad_info);
|
|
|
| - virtual bool TryOverlay(OverlayCandidateValidator* capability_checker,
|
| - RenderPassList* render_passes_in_draw_order,
|
| - OverlayCandidateList* candidate_list,
|
| - const OverlayCandidate& candidate,
|
| - QuadList::Iterator iter) = 0;
|
| -
|
| private:
|
| OverlayCandidateValidator* capability_checker_;
|
| + scoped_ptr<OverlayStrategyCommonDelegate> delegate_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(OverlayStrategyCommon);
|
| };
|
|
|