| 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_SANDWICH_H_ | 5 #ifndef CC_OUTPUT_OVERLAY_STRATEGY_SANDWICH_H_ |
| 6 #define CC_OUTPUT_OVERLAY_STRATEGY_SANDWICH_H_ | 6 #define CC_OUTPUT_OVERLAY_STRATEGY_SANDWICH_H_ |
| 7 | 7 |
| 8 #include "cc/output/overlay_strategy_common.h" | 8 #include "cc/output/overlay_processor.h" |
| 9 | 9 |
| 10 namespace cc { | 10 namespace cc { |
| 11 | 11 |
| 12 class OverlayCandidateValidator; |
| 13 |
| 12 // The sandwich strategy looks for a video quad without regard to quads above | 14 // The sandwich strategy looks for a video quad without regard to quads above |
| 13 // it. The video is "overlaid" on top of the scene, and then the non-empty | 15 // it. The video is "overlaid" on top of the scene, and then the non-empty |
| 14 // parts of the scene are "overlaid" on top of the video. This is only valid | 16 // parts of the scene are "overlaid" on top of the video. This is only valid |
| 15 // for overlay contents that are fully opaque. | 17 // for overlay contents that are fully opaque. |
| 16 class CC_EXPORT OverlayStrategySandwich : public OverlayStrategyCommonDelegate { | 18 class CC_EXPORT OverlayStrategySandwich : public OverlayProcessor::Strategy { |
| 17 public: | 19 public: |
| 18 OverlayStrategySandwich() {} | 20 explicit OverlayStrategySandwich( |
| 21 OverlayCandidateValidator* capability_checker); |
| 19 ~OverlayStrategySandwich() override; | 22 ~OverlayStrategySandwich() override; |
| 20 | 23 |
| 21 OverlayResult TryOverlay(OverlayCandidateValidator* capability_checker, | 24 bool Attempt(RenderPassList* render_passes, |
| 22 RenderPassList* render_passes_in_draw_order, | 25 OverlayCandidateList* candidate_list) override; |
| 23 OverlayCandidateList* candidate_list, | |
| 24 const OverlayCandidate& candidate, | |
| 25 QuadList::Iterator* candidate_iterator, | |
| 26 float device_scale_factor) override; | |
| 27 | 26 |
| 28 private: | 27 private: |
| 28 QuadList::Iterator TryOverlay(RenderPass* render_pass, |
| 29 OverlayCandidateList* candidate_list, |
| 30 const OverlayCandidate& candidate, |
| 31 QuadList::Iterator candidate_iterator); |
| 32 |
| 33 OverlayCandidateValidator* capability_checker_; // Weak. |
| 34 |
| 29 DISALLOW_COPY_AND_ASSIGN(OverlayStrategySandwich); | 35 DISALLOW_COPY_AND_ASSIGN(OverlayStrategySandwich); |
| 30 }; | 36 }; |
| 31 | 37 |
| 32 } // namespace cc | 38 } // namespace cc |
| 33 | 39 |
| 34 #endif // CC_OUTPUT_OVERLAY_STRATEGY_SANDWICH_H_ | 40 #endif // CC_OUTPUT_OVERLAY_STRATEGY_SANDWICH_H_ |
| OLD | NEW |