| Index: cc/output/overlay_strategy_all_or_nothing.h
|
| diff --git a/cc/output/overlay_strategy_all_or_nothing.h b/cc/output/overlay_strategy_all_or_nothing.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..546f1b514daaecf33538389a96b5a9ff1f0e1376
|
| --- /dev/null
|
| +++ b/cc/output/overlay_strategy_all_or_nothing.h
|
| @@ -0,0 +1,35 @@
|
| +// 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.
|
| +
|
| +#ifndef CC_OUTPUT_OVERLAY_STRATEGY_ALL_OR_NOTHING_H_
|
| +#define CC_OUTPUT_OVERLAY_STRATEGY_ALL_OR_NOTHING_H_
|
| +
|
| +#include "cc/output/overlay_processor.h"
|
| +
|
| +namespace cc {
|
| +
|
| +class OverlayCandidateValidator;
|
| +
|
| +// This strategy attempts to promote all quads into overlays.
|
| +// If any quad can't be promoted, it returns false and no quads are promoted.
|
| +class CC_EXPORT OverlayStrategyAllOrNothing
|
| + : public OverlayProcessor::Strategy {
|
| + public:
|
| + explicit OverlayStrategyAllOrNothing(
|
| + OverlayCandidateValidator* capability_checker);
|
| + ~OverlayStrategyAllOrNothing() override;
|
| +
|
| + bool Attempt(RenderPassList* render_passes_in_draw_order,
|
| + OverlayCandidateList* candidate_list,
|
| + float device_scale_factor) override;
|
| +
|
| + private:
|
| + OverlayCandidateValidator* capability_checker_; // Weak.
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(OverlayStrategyAllOrNothing);
|
| +};
|
| +
|
| +} // namespace cc
|
| +
|
| +#endif // CC_OUTPUT_OVERLAY_STRATEGY_ALL_OR_NOTHING_H_
|
|
|