Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_OUTPUT_OVERLAY_STRATEGY_ALL_OR_NOTHING_H_ | 5 #ifndef CC_OUTPUT_OVERLAY_STRATEGY_ALL_OR_NOTHING_H_ |
| 6 #define CC_OUTPUT_OVERLAY_STRATEGY_ALL_OR_NOTHING_H_ | 6 #define CC_OUTPUT_OVERLAY_STRATEGY_ALL_OR_NOTHING_H_ |
| 7 | 7 |
| 8 #include "cc/output/overlay_processor.h" | 8 #include "cc/output/overlay_processor.h" |
| 9 | 9 |
| 10 namespace cc { | 10 namespace cc { |
| 11 | 11 |
| 12 class OverlayCandidateValidator; | 12 class OverlayCandidateValidator; |
| 13 | 13 |
| 14 // This strategy attempts to promote all quads into overlays. | 14 // This strategy attempts to promote all quads into overlays. |
| 15 // If any quad can't be promoted, it returns false and no quads are promoted. | 15 // If any quad can't be promoted, it returns false and no quads are promoted. |
| 16 class CC_EXPORT OverlayStrategyAllOrNothing | 16 class CC_EXPORT OverlayStrategyAllOrNothing |
| 17 : public OverlayProcessor::Strategy { | 17 : public OverlayProcessor::Strategy { |
| 18 public: | 18 public: |
| 19 explicit OverlayStrategyAllOrNothing( | 19 explicit OverlayStrategyAllOrNothing( |
| 20 OverlayCandidateValidator* capability_checker); | 20 OverlayCandidateValidator* capability_checker); |
| 21 ~OverlayStrategyAllOrNothing() override; | 21 ~OverlayStrategyAllOrNothing() override; |
| 22 | 22 |
| 23 bool Attempt(RenderPassList* render_passes, | 23 bool Attempt(RenderPassList* render_passes, |
| 24 OverlayCandidateList* candidate_list, | 24 OverlayCandidateList* candidate_list) override; |
| 25 float device_scale_factor) override; | |
|
ccameron
2015/10/05 19:28:29
Thanks for killing this ....
| |
| 26 | 25 |
| 27 private: | 26 private: |
| 28 OverlayCandidateValidator* capability_checker_; // Weak. | 27 OverlayCandidateValidator* capability_checker_; // Weak. |
| 29 | 28 |
| 30 DISALLOW_COPY_AND_ASSIGN(OverlayStrategyAllOrNothing); | 29 DISALLOW_COPY_AND_ASSIGN(OverlayStrategyAllOrNothing); |
| 31 }; | 30 }; |
| 32 | 31 |
| 33 } // namespace cc | 32 } // namespace cc |
| 34 | 33 |
| 35 #endif // CC_OUTPUT_OVERLAY_STRATEGY_ALL_OR_NOTHING_H_ | 34 #endif // CC_OUTPUT_OVERLAY_STRATEGY_ALL_OR_NOTHING_H_ |
| OLD | NEW |